I'm wondering if it's possible to 'sync' the dataLayer between an iframe and it's parent page.
The situation:
What I want to do is read the dataLayer in the parent from the iframe, ideally through the Tag Manager (Macros). The variable can be updated from the parent page, but the iframe should only read the data.
Is this possible? Google is pretty hazy about the issue and I can't really find a decent answer.
Tracking across IFRAMEs with Google Tag Manager
I would suggest a different solution:
for pushing use the parent
method:
parent.dataLayer.push({'event':'EVENT_NAME', 'var2':'ANOTHER_VARIABLE'});
Let me know if it worked for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With