Am getting the following ‘failed to execute set variables’ tracking error messages in Console when coming from an iframe opened on page A (iframe content / code points to different sub domain page url) and landing on page B.
The event tracking is being fired for clicks on CTA that opens the iframe and on CTA in iframe footer but the page load satellite track tracking for page where users land is not fired.
The ‘Failed to Execute Set Variables’ tracking errors were returned.
Datalayer data is collected ok for page load but the satellite track rule is not fired
Any help / guidance re solving issue would be much appreciated
Is the fact the iframe is hosted on different domain from site causing errors?
The iframe is the issue.... or rather standard web security around iframes is the issue....
Due to a lot of hackers in the past using Cross Frame Scripting attacks, most browsers have completely locked down the ability to pass information naively between an iframe and the parent page.
Even in cases where the domain is the same, the functionality is extremely limited.
Now, looking at your samples, can I assume that you are on the same "main" domain (that in both cases xxx.com is the same.. you are moving between 2 different sub-domains? Not two completely different domains? Meaning you own both sides?
Technically there are some options for opening up some communication between frames, but this needs to be done correctly... as in your DevOPs MUST ensure that only communication between these specific domains is allowed... and nothing else... but this still may not solve your issue, and your Operations team may just give you a straight no...
The other option which is safer, but will require more coding, is to use window.postMessage() to pass information from the iframe to the parent. In theory you could pass information to the main window to facilitate the tracking from your main window about the iframe that is loaded, or actions that are performed in that iframe. But here, you will need to make sure all the information you need from the iframe is passed, that the passed info is available for you to use on the parent page, and that you can appropriately trigger tracking when information is passed from the iframe.
The other option, again will require some delicate care.... but you could embed Adobe Launch into the iframe site... but you need to make sure that if there is an initial page that is automatically loaded with the parent that it doesn't track a page view initially (cause you don't want 2 page views when the parent is loaded), and then you will need to be careful about what you track... note, in this scenario, you will not be able to leverage the visible URL of the parent page.. so if you need this info, this solution will not work.
Basically, iframes suck and make everything complicated
But hopefully one of these suggestions can create a starting point for a solution.
I would look into this error too. Sounds like a code error related to a JSON string that needs to be addressed.