Refresh the data layer object copy 'b' variable after a function call

Silver Contributor
Silver Contributor

Hi Team,

I am trying to update values of b variable after a function is executed. we have set up a function inside a tag, which be executed by another vendor tag. During this function execution, few values are updated in utag_data. These values are not available in manually initiated view and event calls. Is there a way to update the variables of 'b' object inside a function?

1 REPLY 1

Refresh the data layer object copy 'b' variable after a function call

Tealium Employee

If you need the data to be present for other tags, the function must be executed in the "Before Load Rules" or "After Load Rules" extension scope, as those values are set before tags begin executing. Data present in tag-scoped extensions will only be set for the tag it is scoped to. Since your function is inside the tag, anything set there will not be accessible to other tags, even though you're adding it to the "b" object.

You could set the variable to the "utag.globals" object, but it would then need a tag-scoped extension to pull that value in from the globals object, as it's not automatically added to the data layer. 

Jen Kaye
Senior Customer Success Engineer | Tealium, Inc.
Public