Is there any documentation on tealium variables/data objects, names and values? What are valid/invalid values? Maximum lengths? Any reserved values or data objects that have special functionality?

Bronze Contributor
Bronze Contributor
 
3 REPLIES 3

Is there any documentation on tealium variables/data objects, names and values? What are valid/invalid values? Maximum lengths? Any reserved values or data objects that have special functionality?

Tealium Employee

At the base, Tealium is a JavaScript solution therefore any configurations made in the UI should be made with that in mind. With that being said, there are not too many rules in place considering we need to be able to support any standard HTML DOM property e.g. JavaScript variables, Cookies, URL parameters, and Meta data. The few rules we have are a follows:

- Variables declared in the Data Sources tab are case-sensitive

- Tealium creates a cookie called utag_main that stores session and visitor data so this namespace should not be used

- The E-commerce extension creates several variables beginning with “_c” so this taxonomy should not be used

- Any variable declaration should adhere to the JavaScript standards for the variable type, e.g. when creating the utag_data object, the object should make use of JSON syntax.

Please let me know if there are any other questions.

Is there any documentation on tealium variables/data objects, names and values? What are valid/invalid values? Maximum lengths? Any reserved values or data objects that have special functionality?

Tealium Employee

Getting a level deeper, I should also mention two scoped variables within the tag templates. This becomes most important when adding a JavaScript (JS) extension.

The first scoped variable is "a" which Tealium uses to state if the user/visitor event is a "page view" or a "link click". This is a local variable only available when the Tealium library is being ran and that should not be overwritten.

The second scoped variable is "b". It is considered a reference up to utag_data (more below) and also only available when the Tealium library is being ran. The data available in "b" will be unique between each tag template. When writing a JS extension you should use "b.variable" instead of "utag_data.variable" as there is more data specific to the tag available in "b". Even if you are writing a JS extension scoped to all tags, "b" should be used. The only times "b" should not be used is when the JS extension is scoped to "Pre-Loader" or "DOM Ready" as the Tealium library is not in use so the shorthand is not longer referenced.

Here is the relationship between utag_data and b:
utag_data => utag.data => b
- utag_data is the JavaScript object declared on the page by the client
- utag.data is a reference to utag_data plus some DOM data, Metadata, and Cookies
- b is a reference utag.data plus tag specific variables

Please let me know if there is any confusion are other questions.

Is there any documentation on tealium variables/data objects, names and values? What are valid/invalid values? Maximum lengths? Any reserved values or data objects that have special functionality?

Tealium Employee

Check out this post: https://community.tealiumiq.com/t5/1-Getting-Started-Documentation/Universal-Data-Object-Guide/ta-p/... This is our Universal Data Object Guide which provides best practices, examples, etc.

Public