The Track call is normally fired on every page load, which is configurable. It provides web analytics information obtained from data layers, the visited page, referrer page, browser, and internet connection. Data is linked to the user’s active UMID and sent (streamed) to the Events database and Customer Data Store (CDS).
The Track call can be configured to obtain any data from available data layers. Configuration is handled in the client’s JS config set up by Teavaro ClientSDKs support team.
The analytics tracking is a simple JavaScript tag and pipeline configuration. You can specify what data you would like to capture for example from the data layer, query string parameters, and referrer.
Example request:
curl -X POST 'https://funnelconnect.brand-demo.com/op/brand-demo-track/track' \
-H 'Cookie: umdid=NDcyNmQwYTgtOWQ4Ny00MDc5LTkwYmMtNjNhNTA2NGFhNzAwfGQ1YTNhYTc0LTMxZTItNDNlMi1hYjNjLTIwNDY5NjViMzg2OHww' \
--data-raw 'event_name=navigation&event_data=/product/marke-tsarine-caviar-50g/'
Our library can capture data from 3rd party data layers, for example Google’s dataLayer or Tealium’s utag data layer.
{
"ROOT_VARIABLE": ["anyDataLayer1", "anyDataLayerN"],
"SITE_VARIABLES": ["anyVariable1", "anyVariable2", "anyVariableN"],
"GOOGLE_CONFIGURATION": {
"DISPATCH_DATALAYER_UPDATED_EVENT": true,
"EVENT_ATTRIBUTE_LIST": {
"event_name" : ["attribute1, attribute2,", "attributeN"]
},
"GOOGLE_DATALAYER_NAME": "dataLayer"
}
}
ROOT_VARIABLE
is used to define the name of the 3rd party dataLayer (multiple dataLayers are allowed). Note, Google’s dataLayer must be configured in GOOGLE_DATALAYER_NAME
SITE_VARIABLES
defines the event names to be tracked.GOOGLE_CONFIGURATION
contains the Google-related configuration.
DISPATCH_DATALAYER_UPDATED_EVENT
value used to attach a listener event to Google’s dataLayer defined in GOOGLE_DATALAYER_NAME entry, if set to true, a track call is triggered after every push event. Read moreEVENT_ATTRIBUTE_LIST
enhance the tracking capabilities allowing tracking events formatted as an object. This allows us to capture Google recommended events, which have a different format than previous key: value
pairs.GOOGLE_DATALAYER_NAME
defines the name of the Google’s dataLayer, is optional. Default value dataLayer
Here an example config:
{
"GOOGLE_CONFIGURATION": {
"GOOGLE_DATALAYER_NAME": "dataLayer",
"EVENT_ATTRIBUTE_LIST": {
"view_item": ["item_name", "price", "affiliation", "currency"],
"view_item_list": ["item_name", "item_list_name", "list"]
},
"DISPATCH_DATALAYER_UPDATED_EVENT": true
}
}
{
"ROOT_VARIABLE": ["utag:data"],
"VARIABLES_DELIMITER": ":",
"SITE_VARIABLES": ["event_data", "page_url"]
}
It is possible to define a path inside the data layer to look for the variables as shown in utag:data
. This tells the algorithm that the SITE_VARIABLES
are located inside the data
property, improving performance. In this case VARIABLES_DELIMITER
is used when a specific path is defined for a data layer. It tells the algorithm which symbol to use to recursively navigate into the data layer.
Every time a push listener event occur on Google’s dataLayer, a Track call will be executed containing the recently pushed information.
Our library can identify users in Google Analytics using umid
. This allows us to create historic reports of users with no expiration date, whether they are logged in or not. To enable this just add the following configuration:
#PENDING
There may be situations when some events are programmatically pushed into the data layer after the Track call is fired, consequently, those events won’t be tracked.
To prevent this from happening there is an additional configuration that can be enabled to execute the Track call after every push event.
Client’s configuration file example:
const FC_CONF = {
//...
GOOGLE_CONFIGURATION: {
// ...
DISPATCH_DATALAYER_UPDATED_EVENT: true,
// ...
}
//...
};