Skip to content
TTopMail

Tracking

Track product views and browsing behavior to power abandoned browse flows and personalized recommendations. Product views are automatically linked to contacts and can trigger flow automations.

Track Product View

POST
/track/product-view

Record a product view for a contact

NameTypeRequiredDescription
emailstringOptionalContact email address. Required if contact_id is not provided.
contact_idstring (UUID)OptionalContact ID. Required if email is not provided.
product_idstringRequiredYour product identifier (max 100 characters)
product_namestringRequiredProduct display name (max 200 characters)
product_urlstring (URL)RequiredFull URL to the product page
variant_idstringOptionalProduct variant identifier (max 100 characters)
image_urlstring (URL)OptionalProduct image URL
pricenumberOptionalProduct price (must be >= 0)
currencystringOptional3-letter ISO currency code (default: USD)
categorystringOptionalProduct category (max 100 characters)
brandstringOptionalProduct brand name (max 100 characters)
skustringOptionalStock keeping unit (max 100 characters)
session_idstringOptionalBrowser session ID for grouping views (max 100 characters)
curl -X POST https://api.topmail.so/api/v1/track/product-view \
-H "Authorization: Bearer tm_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"email": "shopper@example.com",
"product_id": "prod_abc123",
"product_name": "Premium Wireless Headphones",
"product_url": "https://yourstore.com/products/wireless-headphones",
"image_url": "https://yourstore.com/images/headphones.jpg",
"price": 99.99,
"currency": "USD",
"category": "Electronics",
"brand": "AudioCo",
"sku": "WH-PRO-BLK"
}'
{
"data": {
"id": "view-uuid-12345",
"contact_id": "contact-uuid-67890",
"product_id": "prod_abc123",
"product_name": "Premium Wireless Headphones",
"viewed_at": "2025-01-15T14:30:00.000Z"
}
}

Flow Triggers

Product views automatically trigger product_viewed flow automations. Use this to set up abandoned browse emails, product recommendation flows, or price drop notifications.

Contact Required

The contact must already exist in your workspace. If the email or contact_id does not match an existing contact, the API returns a 404 error. Create the contact first using the Contacts API.

Bot Detection & Metric Accuracy

TopMail automatically detects and flags bot activity in email tracking events. Every open and click event includes bot detection metadata so you can filter automated scanner activity from real engagement.

Detection Methods

  • Honeypot links — Every email includes an invisible link hidden from human readers. Only bots click it. This is the highest-confidence signal.
  • Click burst detection — 3+ link clicks within 2 seconds, or 5+ within 30 seconds, flags all clicks as bot.
  • IP detection — Known security scanner IPs (Proofpoint, Microsoft Defender, Mimecast, Barracuda) and datacenter IPs.
  • User agent analysis — Known bot user agents (Python requests, curl, crawlers, etc.).
  • Timing analysis — Clicks within 10 seconds of delivery are flagged as suspicious.
  • Apple MPP detection — Apple Mail Privacy Protection proxy opens are flagged separately.

Inferred Opens

When a human clicks a link but no open was recorded (images blocked), TopMail automatically creates an inferred open event. This prevents click rate from exceeding open rate and matches the approach used by Mailchimp. Inferred opens have metadata.inferred: true in the event data.

Bot Fields on Events

NameTypeRequiredDescription
is_botbooleanOptionalWhether this event was flagged as bot activity.
bot_typestringOptionalType of bot detected: security_scanner, apple_mpp, datacenter, timing, honeypot, user_agent, or behavior.
bot_confidencestringOptionalDetection confidence: high, medium, or low.
bot_signalsstring[]OptionalArray of detection signals that triggered the classification.

Filtering in Your Analytics

TopMail's dashboard and analytics automatically exclude bot events. If you're using the API or webhooks to build your own analytics, filter events where is_bot = true to get accurate human engagement metrics.

Tracking API — Product Views & Browse Events | TopMail