Set up utag_main_pn and utag_main_sn value as custom dimension in GA

defelicemattia
Silver Contributor
Silver Contributor defelicemattia

Dear Community,

 

I have been trying to set utag_main_pn and utag_main_sn cookie parameters to custom dimensions in GA but it seems not working.

 

I have created a first party cookie data source and name it utag_main_pn, then I have created a UDO variable with the JS code b["cp.utag_main_pn"]. Then, mapped this UDO variable to a custom dimensions I have created in GA but it seems not working.

 

What am I doing wrong?

 

Thank you very much for your support.

6 REPLIES 6
Highlighted

Set up utag_main_pn and utag_main_sn value as custom dimension in GA

Tealium Employee

Hi @defelicemattia,

 

Without knowing more details I can't answer fully but I suspect that it has something to do with how the cookie is being generated. Are you using the Persist Data extension?  Here is a reference to an article regarding the Persist Data extension:

https://community.tealiumiq.com/t5/Developers/Persist-Data-Value-Extension/m-p/1075

 

Is your cookie value being stored within the utag_main cookie or outside? If outside perhaps that is the issue.

 

This is a case where we would need to look under the hood to help you investigate. Please reach out to your account manager for help to review your implementation.

 

 

Set up utag_main_pn and utag_main_sn value as custom dimension in GA

defelicemattia
Silver Contributor
Silver Contributor defelicemattia

Hi @david_bird,

 

No I am using a normal Set Value extension and not a Persistent one. I am storing the cookie within the utag_main. I have also checked the cookie on the page and it contains the value I am looking for. I have tried to combine this value with a GA generated cookie and the GA is parsed correctly and the pn value returns as undefined.

 

This is the reason why I think it has something to do with when the cookie is generated and might be that the value is mapped before being generated.

 

Might this be a reason for you? If yes how do I make sure the data source is created before the value is mapped to the dimension?

Set up utag_main_pn and utag_main_sn value as custom dimension in GA

Tealium Employee

Hi @defelicemattia

 

So I think you might be over complicating this.

 

Once you have created the CP Data source:

 

utag_main__pn.png

 

You can just map that straight to the GA Tag

 

ga.png

 

This will then send the utag_main__pn value out:

 

request.png

 

Hope this helps,

 

Adrian

Ask me anything Tealium related or Javascript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.

Set up utag_main_pn and utag_main_sn value as custom dimension in GA

defelicemattia
Silver Contributor
Silver Contributor defelicemattia

Hi @adrian_browning ,

 

Thank you very much for your answer and I can see why you say that and that's the same feeling I had but this is not working either. 

 

Any other ideas? 

 

Loading the parameter from the console with the syntax utag.loader.RC("utag_main")._pn it returns the correct value. How do I place this value in a CD?

Set up utag_main_pn and utag_main_sn value as custom dimension in GA

defelicemattia
Silver Contributor
Silver Contributor defelicemattia

Dear all,

 

I have fixed the issue creating a set value extension with js code utag.loader.RC("utag_main")._pn and then mapped it with the CD into the tag.

 

thank you for your help.

Set up utag_main_pn and utag_main_sn value as custom dimension in GA

kathleen_jo
Employee Emeritus
kathleen_jo

@defelicemattia wrote:

Dear all,

 

I have fixed the issue creating a set value extension with js code utag.loader.RC("utag_main")._pn and then mapped it with the CD into the tag.

 

thank you for your help.


@defelicemattia Thank you for sharing your solution!

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.