Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!
SOLVED

Adobe Launch Tag Firing Twice when abc.com is iframed in sub.abc.com

Avatar

Level 1

Hello there, hope someone can help me with this!

 

Our main domain is abc.com and we are using an app that has an example share URL sub.abc.com/xyz. The subdomain URL is basically an iframe that has abc.com inside it. We have added the Adobe Launch script to both abc.com and sub.abc.com. The problem is that when we go to the subdomain url sub.abc.com/xyz that has an iframe of abc.com the launch script is dropped twice. Is there anyway to avoid this? I know that we can create a different property for subdomain so that it would not fire the same launch tag twice however that's not our preferred option. Is there any way to suppress the launch tag from firing if its already dropped once in the browser?

 

image001 (4).png

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

An iframe by its very nature will act like a 2nd domain and any tagging as such will fire like you see the double effect.

Depending on the browser and page behaviour perhaps using direct call rule is a better approach?

 

Fire them instead in iframe vs script tag and you can choose to make them be a pageview or not.

 

 

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

An iframe by its very nature will act like a 2nd domain and any tagging as such will fire like you see the double effect.

Depending on the browser and page behaviour perhaps using direct call rule is a better approach?

 

Fire them instead in iframe vs script tag and you can choose to make them be a pageview or not.

 

 

Avatar

Level 1

Thanks so much @Pablo_Childe appreciate your help! Would be great if you could please elaborate on the last part "Fire them instead in iframe vs script tag and you can choose to make them be a pageview or not."

 

TIA!

Avatar

Community Advisor

Yes basically if iframe is part of a master outer page where a pageview has fired then on internal iframe fire a direct call rule. Direct cal rules can fire to do things like capture click actions, setting variables/events or pageviews. Depending on what you want them to do they can be a means of firing a beacon so you load the iframe but don`t get a new pageview. Now remember a direct call rule will still potentially casue a 2nd beacon(so 2nd server call in your case) but it doesn't have to be a new pageview.

 

Heres and older link on them see if it helps you understand a bit more.

 

https://experienceleaguecommunities.adobe.com/t5/dynamic-tag-management-questions/dtm-direct-call-ru...

 

 

Avatar

Community Advisor and Adobe Champion

I know that Pablo already helped you, but here is another option (depending on your site usage and scripting skills)

 

First, will sub.abc.com always be loaded inside a Frame, or does it get accessed directly?

 

One thing you can do, on initial load is check if sub.abc.com is loaded inside a Frame and suppress the page view (https://www.geeksforgeeks.org/how-to-check-a-webpage-is-loaded-inside-an-iframe-or-into-the-browser-...)

 

Use the parent page's tracking (since I know you are using a global suite) to track both the parent with "sub site" information.

 

If there is navigation within the framed site (which won't trigger tracking in the parent frame, you can then track those subsequent page views - or track them as actions... it really depends on whether or not you want those sub-pages to register as page views or not (since this will affect your page views for your entire suite, this is a decision that you need to make based on how the frames are going to be used).

 

Or IF your developers can create inner frame communications (be careful with the security settings to only allow authorized domains to allow communication to ensure you don't open the site up to cross frame scripting attacks) you might be able to use the code all on the parent site to facilitate the tracking.... but your DevOps team may reject that, which is why you are probably going to have to get creative with the tags in the frame.

 

We have a similar situation on one of our sites... I have a special launch property set up specifically to track the iframe content (but these don't have navigation... they are basically fancy infographics, or interactive flip cards that get injected into the main site). So my Launch property is set up with no page view tracking, and only handles the interactive actions. I send the data to the main suite, but I don't have double tracking because I have explicitly separated the implementations.