If you are an expert with Google Analytics/Google Tag Manager and know about Amazon affiliate product links, this question is for you.
One of the Amazon Product Links uses iframe, and it doesn’t fire an event. In the GTM debugging preview mode, it shows that the Label is undefined. It works for regular outbound text links, but something about this iframe GTM doesn’t like it so it doesn’t fire.
I’m using Click URL as the event, but I’m wondering if that’s the issue, because this iframe HTML Amazon.com generates for affiliate sales doesn’t have the regular URL embedded in there.
Working within the iframe wouldn’t be a security risk. I thought you were trying to trigger an event handler that is outside the iframe. That could be a security risk if it were possible.
Does the handler attempt to reference something outside the iframe?
Yes, the 3rd-party is Amazon.com. This is for affiliate sales. Amazon does a built-a-link thing for products, and it generates the iframe code I provided.
I tired adding the GTM code to the iframe, but it has no effect. Maybe the GTM and the GA code needs to be included? When I click on the link in the GTM preview it opens a new page and that works, but it doesn’t show any action that it has been clicked on. There is no gtm.* stuff provided.
Maybe iframe isn’t ready for prime-time for using this with GTM/GA?