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