1

Tag manager code has been implemented within an iframe on a webpage. It has not been added to the webpage that contains the iframe.

Ive used tag manager to then implement a floodlight tag, and looking at the stats it seems to be double firing.

Do you know why this might be and how to fix it?

blabey
  • 11
  • 2

1 Answers1

0

You have to create a blocker to avoid send data when you load this on an iframe, you can use this variable (Custom Javascript)

function inIframe () {
    try {
        return window.self !== window.top;
    } catch (e) {
        return true;
    }
}

How to identify if a webpage is being loaded inside an iframe or directly into the browser window?

And create a blocker when this var is true

Kemen Paulos Plaza
  • 1,560
  • 9
  • 18
  • thanks for your response, but I want to count the iframe. Its the iframe data i'm interested in, not the page the iframe is contained in. – blabey Sep 27 '17 at 09:45
  • I see, but GTM is on both ( Page and iframes)? because is a common reason to have double firing, this is caused because you're loading 2 times the GTM. So a option, in that case, is backward the condition. using true instead of false. – Kemen Paulos Plaza Sep 27 '17 at 10:41