Highlighted

How to assign object b to another reference object which is placed on the site ?

Silver Contributor
Silver Contributor

This is the code on the site : window.utag_data = o;

 

And the reference object which is used by tealium is "b" as a reference for utag_data.

How do i assign object "b" to "o" so that i can see the UDO variables in Tealium WebCompanion?

 

Thanks !

 

Pallavi

3 REPLIES 3
Highlighted

How to assign object b to another reference object which is placed on the site ?

Employee Emeritus

Hi Pallavi,

 

Can you elaborate more on what you are trying to accomplish?

The b-object can only be referenced within a "tag template" or any extensions scoped to either "All Tags" or any tags.  You cannot reference the b-object from an extension scoped to either "DOM-Ready" or "Pre-loader".

 

For example, say you want to assign your UDO variable "google_product_name" with the value of "product_id" that is within your "utag_data".  You can added a "Set Data Value" extension, scope it to either "All Tags" or a specific tag (i.e. Google Universal Analytics).  From there you can SET: google_product_name TO: (JS CODE) b.product_id

 

In most cases, I see more uses with the b-object when writing a custom Javascript extension.

 

Let me know if this makes sense.  Again, if you can elaborate more, I can help give you a better answer.  Hope this helps.

Highlighted

How to assign object b to another reference object which is placed on the site ?

Employee Emeritus

After consulting with my colleague here regarding Web Companion, the tool itself does not read in the "b-object" it reads "utag.data", which is a combination of utag_data and all the web page properties that are built into the data layer (querystring, meta, cookies, etc.)

Highlighted

How to assign object b to another reference object which is placed on the site ?

Silver Contributor
Silver Contributor

Thanks for your help :) The problem is solved .

 

I have another question regarding the Javascript extensions, @meng_lim.

 

How can we  include jquery script in a javascript extension to track events just to avoid creating multiple jquery handlers?

 

Example :  #Form1 header.ui-container.ui-header div.ui-content div.fb-like ul.socialLink li a img --> is the jquery selector for a fb button , likewise i have other social network buttons which i want to track using a single javascript extension .

 

Thanks again for all your help .

 

Pallavi