- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
09-01-2022 02:13 AM
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?
09-07-2022 02:52 PM
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.
Copyright All Rights Reserved © 2008-2023