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 lists of attributes that can be sent to AnyTrack webhook or JS event snippets alongside standard and custom events.

Importance of Event Attributes

Tracking conversions is important, and so is collecting their associated attributes. The attributes allow you to create custom audiences in your ad network, but most importantly, the data in the attributes is valuable training information for the ad delivery algorithm. By feeding the attributes, you improve your ad targeting and consequently improve ROAS. So the more _relevant _parameters you include, the better your results will be.

For example, suppose you feed Facebook Conversion API with the product name that was purchased. In that case, 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!. Also, parameter names cannot contain spaces.

Supported Essential Event attributes

These are attributes of great importance because they define the value of the conversion, its name, as well as critical elements for tracking such as the Click ID .

Parameter nameTypeDefault ValueNotes
event_namestring-One of standard event names.
click_idstring-The AnyTrack Click ID passed to your cart, link, or form.
valuenumber-Revenue (monetary value of the event)
timestampintegerA timestamp value in seconds to replace the receivedAt timestamp. 1709735124
brandstring-Brand name
idstring-The link id
urlstring-The event link
labelstring-The link label
currencystringProperty CurrencyIf you don't send the currency, AnyTrack will default to the property default currency.
transactionIdstring-A unique id that can be used for deduplication.
shippingPricenumber-
taxPricenumber-
itemsEventItem[]Array of items, see Product Attributes
refIdstring-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...).

Supported PII attributes (Customer data)

Customer data parameters are supported and will be automatically parsed, hashed, and normalized according to the ad platform's 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 nameTypeExampleNotes
emailstring[email protected]
firstNamestringJohn
lastNamestringSmith
fullNamestringJohn SmithOptional, can be provided instead of first and last names
phonestring+1 (650) 555 4444Including country code and area code
birthdatestringMay 26, 1991 or 1991-05-26
citystringMenlo Park
statestringCATwo-letter state or province code
zipcodenumber94025Zip or Postal Code
countrystringUS or United StatesTwo-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.

Product Attributes

If you are integrated with an eCommerce platform, you can add a list of "items" following the parameters below:

Item parameterTypeDefault ValueNotes
idstring-The item id/sku (required)
namestring-The item name
quantitynumber1amount of items
pricenumber-the item price (required)

Examples

The following examples demonstrate how attributes can be used in conversion events, whether triggered client-side (via JS event code) or server-side (via a webhook to a Custom Integration).

Purchase Event Code (Client-Side JS Tag)

Here is a complete example of how to use the event parameter when triggering a custom event on the browser side using an event snippet. This example includes standard attributes, personally identifiable information (PII), and product attributes:

<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>

Purchase Event (Server-Side Webhook to AnyTrack)

This is an example of the Purchase event sent server-side using a webhook to an AnyTrack Custom Integration. The JSON payload includes standard, PII, and product attributes.

{
    "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"
}

You would send the JSON payload to an endpoint like the following, which will be provided when you install a Custom Integration in your account.

https://t1.anytrack.io/accountid/collect/