Suppressing Page view from iframe

sanmeetw1519854 28-05-2019

Hi,

One of our clients is showing iframe of other contents of the site if users hover over certain sections. As a result of this, the iframe is causing sencondary page load calls on top of the primary call for the page on which the iframe is hosted.

I want to suppress this call. We are using DTM. Any ideas how this can be done?

Sanmeet

Accepted Solutions (1)

Accepted Solutions (1)

ursboller
MVP
28-05-2019

we have the same setup, here's our solution (for the DTM property in the iFrame)

1) create a data element "in iFrame" which returns "yes" or "no". check by Javascript if the page is loaded in an iFrame. possible code see here: https://tommcfarlin.com/check-if-a-page-is-in-an-iframe/

2) in your page load rule add a new condition like "in iFrame = no"

this setup should stop tracking the pageload within the iFrame.

Answers (0)