Skip to main content
May 23, 2016
해결됨

double tracking in iframes

  • May 23, 2016
  • 2 답변들
  • 2223 조회

Hi everyone,

I have a question about the settings of pageviews in Adobe Analytics.
 
We've got a webpage with an iframe. The container has been implemented  with DTM and the iframe has been tagged with custom link and eVars.
 
When the page is loading, a pageview is sent (through DTM), but the iframe also sends a pageview because of its tracking code. ¿Is there any change to delete the second pageview tracking (in order to only have one) and leave the event tracking?
 
Thanks in advance!
이 주제는 답변이 닫혔습니다.
최고의 답변: ParitMittal

Hi ,

You'll need to suppress second page view by adding below code to your tool custom code.

var isInIframe = (parent !== window)
if(isInIframe ){
return false; //this will prevent the Adobe Analytics tool to send a pageview image request
}else{
return true; //this will allow the Adobe Analytics tool to send a pageview image request
}

Please do let us know in case of any questions or queries.

Thanks & Regards

Parit Mittal

2 답변

ParitMittal
Level 10
May 24, 2016

Hi ,

You'll need to suppress second page view by adding below code to your tool custom code.

var isInIframe = (parent !== window)
if(isInIframe ){
return false; //this will prevent the Adobe Analytics tool to send a pageview image request
}else{
return true; //this will allow the Adobe Analytics tool to send a pageview image request
}

Please do let us know in case of any questions or queries.

Thanks & Regards

Parit Mittal

November 30, 2018

Hi Parit Mittal,

I think you will be able to help me with the following.

I have similar issue as above but the scenarios are bit different.

I have a website (Site-A) which has a third party tool as an iframe (Site-B).

Site-A using an Ensighten space called A-space. Site-B using Ensighten space called B-space. So not just pageviews but also all the events are fired 2 times (one in A-space, another in B-space) as same DataLayer object is used in both the spaces.

Note: Site B is a third party domain and I managed to add Ensighten script on their site. I can ask their developers to add/change any code for the iFrame.

Is there a way to prevent a tag from firing twice?

Let me know if you need more details.

Thanks,

Goutami