eventData argument of track(). That object has three kinds of keys:
Sample payload with every standard parameter, item parameter, user data parameter and address parameter on a
purchase:
cartId, searchTerm, categoryId and category and formId.
Rules for all parameters
- Send numbers as numbers and IDs as strings. The Events API rejects
value: "12"and a numericid. Google Ads and Microsoft Ads ignore avaluesent as a string. - Money is in major units (
34.99, not3499). The exceptions are the SaaS parametersmrr,arr,mrrDelta,ltvandamount, which are in cents. - Use the key names exactly as listed. Upstack doesn’t convert other spellings, such as
order_idfororderId. - Upstack doesn’t calculate totals. Send
valueyourself.
Standard parameters
Each event page shows which of these it uses and which are required. SaaS events add their own SaaS parameters.Item parameters
User data
Each event page shows one of these two tables. When the person may be anonymous, such as browse, cart andinitiate_checkout events:
* Required once you know it.
When you know who the person is, such as later checkout steps, order and lead events:
* Required if you have it.
More detail: User data.
Custom data
Any key that isn’t listed above is custom data, such asloyaltyTier: 'gold'. See Custom data for what you can do with it.
Event IDs
Leave the event ID to Upstack. It uses the ID to remove duplicates, and it drops any event whose ID it has already seen in the last 30 days.page_view, view_content, view_category and view_cart are exempt.
purchasegets the IDpixelId_orderId. That’s how the browser and server copies of an order count as one.- Send
transactionIdonpurchaseonly. Any other event that carries it gets the same ID as the purchase. - To send your own ID, for example so repeat page loads count once, pass it as the third argument of
track(). Don’t do this onpurchase.
Sending events from your server
Send the same object aseventProperties in a POST /tr/api/events request, but put the email and phone in userProperties, as emails and phones arrays. On this API, only userProperties links the event to a person.