Highlighted

Is there a way to edit a UDO variable passed through a utag.link tag before the Google Analytics custom event is set?

Not applicable
 
4 REPLIES 4
Highlighted

Is there a way to edit a UDO variable passed through a utag.link tag before the Google Analytics custom event is set?

Employee Emeritus
Yes, you can create a Javascript Code extension, scope it to the Google Analytics tag, and type in something like this: if (a == 'link' && b.myUDO == 'value') { b.myUDO = 'newValue'; } Just make sure this extension is below any other extensions that may already be changing or setting your UDO variable.
Highlighted

Is there a way to edit a UDO variable passed through a utag.link tag before the Google Analytics custom event is set?

Employee Emeritus
The JavaScript extension will in fact work for this scenario, however it should be used as the extension of last resort. In this example a simple Set Data Value extension can be used. 1) Add the Common Data Source Bundle called "Tealium Built-in Data" 2) Add Set Data Value Extension Scope to Google Analytics Set myUDO to Text: newValue When (UTAG) event equals: link AND myUDO equals: value See image below:
Highlighted

Is there a way to edit a UDO variable passed through a utag.link tag before the Google Analytics custom event is set?

Not applicable
Thank you for the input, this seemed to work. Although, the new value carries over to other events on the page, and isn't limited to that one event. There's no longer a need to edit the UDO (the analyst changed their mind), but any more information will be appreciated. Thanks again!
Highlighted

Is there a way to edit a UDO variable passed through a utag.link tag before the Google Analytics custom event is set?

Employee Emeritus
Key Value pairs will "merge" into utag.data if the scope is set to all tags so that they can be used with load rules (at some point in the future, this will probably change). If the scoped is changed to a specific tag or tags then it will not merge back into utag.data.