- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
01-22-2023 09:57 PM
Hi
We are implementing GA4 tags on a SPA. We are currently trying to use the lookup table to set value of a variable "logical_event_trigger" with "page_name_pageview_only" as the source. The issue is that there is an Iframe present at the site with two data layers utag.data and utag.latitudeData.
The extension is only able to pick data from utag.data and not utag.latitudedata.
Any idea on how we can make the extension use utag.latitudeData as the refrence datalayer? Any input would be very appreciated
Solved! Go to Solution.
01-23-2023 07:07 AM - edited 01-23-2023 07:19 AM
Hello Somesh,
The tags, load rules and extensions work on "current" data layer object which is referenced by the b object in JavaScript extension.
In your case you need to merge the utag.latitudeData with b object.
You can do that with the following JavaScript Code extension set to Before Load Rules Scope and placed as high as possible in this scope using Load Order Manager.
Object.assign(b, utag.latitudeData);
Few notes:
When the key collisions are a problem and you would like to ignore values from latitudeData or just use selected number of values then script with a bit more logic will be required to be used.
01-24-2023 12:19 AM
Copyright All Rights Reserved © 2008-2023