Web event specificity
Fields automatically added to event
The JS SDK, Web container and GTM bridge add automatically specific properties in the event regarding the browser. Here is a complete event payload example :
{
"event_name": "search",
"search_term": "t-shirts",
"url": "https://www.mywebsite.com/path1/path2/", //Automatically added if missing
"path": "/path1/path2/", //Automatically added
"referrer": "https:///www.google.fr", //Automatically added
"title": "My page title", //Automatically added if missing
"user": {
"id": "12345",
"consistent_anonymous_id": "567892" //Automatically added
"email": "[email protected]",
"consent_categories": ["1","3"] //Automatically added if you use Commanders Act CMP
},
"context": {
"event_id": "202110130000000000", //Automatically added
"generatorVersion": "10.0", //Automatically added
"containerVersion": "3.1", //Automatically added
"event_timestamp": "1639044446636", //Automatically added
"page": { //Automatically added
"title": "Search page", //Automatically added
"url": "https://shop.com/search?q=...", //Automatically added
"lang": "en", //Automatically added
"referrer": "https:///www.google.fr", //Automatically added
"viewport": { //Automatically added
"width": 320, //Automatically added
"height": 568 //Automatically added
}
},
"device": { //Automatically added
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36",//Automatically added
"ip": "102.3.4.56",//Automatically copied from the request header
"lang": "fr",//Automatically added
"cookie": "_fbp=123; _fbc=456; _ga=789",//Automatically added
"timezone": "Europe/Paris"//Automatically added
}
}
}
Fields automatically added
Field name
Example value
Description
context.event_id
202110130000000000
Id of the event
context.event_timestamp
1639044446636
Timestamp of the event sending time.
context.device.user_agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
The browser's user agent
context.device.lang
fr
Browser language
path
/path1/path2/
Path of the current url (only on page_view)
title
My page title
Title of the current page (only on page_view)
page.*
pages information
Last updated
Was this helpful?