Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Tracking Cross Domain-Iframe embedded

Avatar

Avatar
Boost 3
Level 1
Knowledgeseeker98
Level 1

Likes

4 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Boost 3
Boost 1
View profile

Avatar
Boost 3
Level 1
Knowledgeseeker98
Level 1

Likes

4 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Boost 3
Boost 1
View profile
Knowledgeseeker98
Level 1

27-04-2021

Hi fellas,

 

 

My Case:

I have a scenario which i want to track form submissions, form is getting loaded within a iframe .This iframe is a different domain say Domain B and the parent page is Domain A.We want to track the variables and events inside the iFrame.

As in my case its different domain,i might not face any challenges while implementing the DTM on it and Mid will be passed with respect to the domain.

 

 

Can anyone suggest, do we need to try this:IFrame that loads a third-party page is if that third-party page posts "messages" back to the parent frame via the postMessage() browser API.

So do we need to follow postMessage  method to communicate and retrieve the values from iframe or do we need to  paste the this code inside the iframe  and the parent page to get the values?

 

//Instantiate Visitor 
var visitor = Visitor.getInstance("Insert Experience Cloud Organization ID here",{ 
 ... 
 //Add parent page domain name and iFrame domain names 
 whitelistParentDomain: "parentpageA.com", 
 whitelistIframeDomains: ["iFrameDomain1.com","iFrameDomain2.com"], 
 ... 
 } 
);

Reference: whitelistParentDomain and whitelistIframeDomains | Adobe Experience Cloud Services

 

 

Please help me to give suggestions for this issue.

 

Thanks

 

View Entire Topic

Avatar

Avatar
Springboard
MVP
yuhuisg
MVP

Likes

146 likes

Total Posts

476 posts

Correct Reply

90 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Establish
Contributor
View profile

Avatar
Springboard
MVP
yuhuisg
MVP

Likes

146 likes

Total Posts

476 posts

Correct Reply

90 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Establish
Contributor
View profile
yuhuisg
MVP

28-04-2021

whitelistParentDomain and whitelistIframeDomains will help you ensure that the same visitor gets tracked with the same ID in both the parent and Iframe pages. But this assumes that your Iframe page at domain B also runs ECID and AA.

If the Iframe page at domain B doesn't run ECID and/or AA, then postMessage() would be your best choice. In that case, you'd get domain B's developers to post a message for every user interaction. Then in the parent page at domain A, your tracking code would listen for the messages and fire the appropriate beacon(s). So all tracking happens in domain A only, and the Iframe page at domain B is invisible to AA.