Event Attributes
Discover how to leverage event attributes so you can improve your match rate of your Event Match Rate and increase ROAS.
This article covers the list of attributes that can be sent to AnyTrack webhook or javascript event snippets alongside standard and custom events.
The importance of Event Attributes
Tracking conversions is important, but so are the associated attributes and properties sent with the conversion.
For example, if you feed Facebook Conversion API with the product name that was purchased, you'll be able to create a custom audience based on the product name, which will allow you to retarget this audience with a related product, or product category.
Case sensitive
All parameters are case sensitive!
Supported attributes:
Parameter name | Type | Default Value | Notes |
---|---|---|---|
click_id | string | - | The AnyTrack Click ID passed to your cart, link or form. |
value | number | - | Revenue |
timestamp | integer | A timestamp value in seconds to replace the receivedAt timestamp. 1709735124 | |
brand | string | - | Brand name |
id | string | - | The link id |
url | string | - | The event link |
label | string | - | The link label |
currency | string | Property Currency | If you don't send the currency, anytrack will default to the property default currency. |
transactionId | string | - | A unique id that can be used for deduplication. *Read below |
shippingPrice | number | - | |
taxPrice | number | - | |
items | EventItem | [] | Array of items, see below. |
refId | string | - | An external id alternative to the standard click_id . Learn more. |
Good to know
When triggering an Event, AnyTrack Tracking Tag automatically collects first party data parameters (Cookies, IP, User Agent...).
Customer data
Customer data parameters are supported and will be automatically parse, hashed and normalized according to ad platforms requirements.
Reminder
When you connect with an integration from the Catalog, these parameters are automatically parsed if present in the conversion data sent by the Integrated platform.
Parameter name | Type | Example | Notes |
---|---|---|---|
email | string | [email protected] | |
firstName | string | John | |
lastName | string | Smith | |
fullName | string | John Smith | Optional, can be provided instead of first and last names |
phone | string | +1 (650) 555 4444 | Including country code and area code |
birthdate | string | May 26, 1991 or 1991-05-26 | |
city | string | Menlo Park | |
state | string | CA | Two-letter state or province code |
zipcode | number | 94025 | Zip or Postal Code |
country | string | US or United States | Two-letter country code is recommended |
Automatic data hashing:
You don't need to hash the data as AnyTrack automatically formats and hashes the required data according to the ad pixels and analytics requirements.
E-Commerce parameters
If you are integrated with an eCommerce platform, you can add a list of "items" following the parameters below:
Item parameter | Type | Default Value | Notes |
---|---|---|---|
id | string | - | The item id/sku (required) |
name | string | - | The item name |
quantity | number | 1 | amount of items |
price | number | - | the item price (required) |
Example of a Client Side JS Tag (purchase event)
Here is a complete example of how to use the event parameter when triggering an event:
<script>
var click_id = AnyTrack('trigger', 'Purchase', {
value: 29.9, // the total purchase value
shippingPrice: 5.9, // optional shipping price
taxPrice: 2.9, // optional taxes
currency: 'EUR',
transactionId: 'XJW0047',
email: '[email protected]',
firstName: 'John',
lastName: 'Smith',
country: 'US',
state: 'DE',
city: 'Newark',
zipcode: '19702',
items: [{
id: '20291', // the item catalog id (required)
name: 'Sony MDRZX110/BLK ZX Series Stereo Headphones',
quantity: 1,
price: 19.9 // the item price (required)
}, {
id: '49292', // the item catalog id (required)
name: '6.35mm Male 3.5mm Female Headphone Stereo Audio Connector',
quantity: 1,
price: 4.1 // the item price (required)
}]
});
</script>
Example of a Webhook URL with a JSON payload
Reminder
In order to use the webhook url end point, you must create a custom integration.
https://t1.anytrack.io/accountid/collect/
{
"event_name": "Purchase",
"click_id": "f8e3bf8dfba8b51ce3340",
"email": "[email protected]",
"refId": "[email protected]",
"fullName": "Elon Musk",
"address": "Milky Way 1",
"phone": "+1919875666",
"country": "Space",
"items": [{
"id": "20291",
"name": "Sony MDRZX110/BLK ZX Series Stereo Headphones",
"quantity": 1,
"price": 20.00,
"brand": "Sony"
},
{
"id": "49292",
"name": "Beats Headphones",
"quantity": 1,
"price": 100.00,
"brand": "beats"
}],
"currency": "USD",
"id": "24356562534585",
"subtotalprice": 120.00,
"totalprice": 120.00,
"taxPrice": 10,
"value": 120.00,
"transactionId": "#24356562534585"
}
Updated 2 months ago