Convert tracking calls
You must convert data layer on tracking calls if you are passing your third-party data layer object to your Tealium tracking calls.
Example:
utag.link({
"event" : {
"type": "cart",
"name": "add to cart",
"items" : [{
"id": "prod123",
"price": "123.45",
"qty": "2"
}]
}
});
Add the extension
Use the following steps to convert data layer tracking calls:
- In the left sidebar, navigate to iQ Tag Management > Extensions.
- Add a JavaScript extension.
- In the Title field, enter
Convert Tracking Calls
. - In the Draft Name field, enter a name for your draft.
- In the Scope field, select All Tags.
- Change the execution to Before Load Rules.
- Copy and paste the following code into the JavaScript field for the extension:
teal.flattenObject(b,b);
- Click Approve for Publish.
- Select one or more publish environments and click Apply.
- Save and publish your changes.
This page was last updated: January 7, 2023