Tracking an iFrame using AEP - changing MCID challenge | Community
Skip to main content
New Participant
January 30, 2024
Solved

Tracking an iFrame using AEP - changing MCID challenge

  • January 30, 2024
  • 1 reply
  • 920 views

We have an issue with tracking an iFrame using AEP and changing MCIDs


We have AEP Installed across our primary domain (x.com) everything works fine, Analytics sends the correct beacon requests and the MCID remains constant.


Recently the business has developed an ACS webform and hosted on completely different domain (.adobe-campaign.com) and added it into a webpage on our primary domain as a standard iFrame.


We’ve added AEP to this webform (.adobe-campaign.com).


When we navigate to the primary domain (x.com) with the iFrame (.adobe-campaign.com) we see two-Analytics page load requests (x.com) with the constant MCID and (.adobe-campaign.com) with a different MCID.


I understand that the iFrame will generate a new MCID as it’s on a completely different domain however the issue I have is that every hit to (.adobe-campaign.com) generates a completely new MCID and not keep the first.


I have two questions:


- Is there a way the iFrame (.adobe-campaign.com) can use the primary MCID from (x.com)? – I’m not sure this is possible as they are totally different domains.

 

- If the above is not possible how can we configure so the the iFrame (.adobe-campaign.com) keeps the same MCID and not change every refresh/hit?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by yuhuisg

In your <iframe> HTML tag, are there any attributes besides the standard "src" one? IFRAMEs can have attributes that instruct the browser to restrict the data that can be sent between the parent frame and the IFrame, and that could cause issues like what you're observing with your cookie.

One way to make the MCID remain constant in the IFrame is to pass the MCID from your parent domain to your IFrame. You can use ECID's appendVisitorIDsTo method to  "decorate" the IFrame's "src" URL with the MCID. This will have to be done programmatically by your developers. One warning: it could cause the IFrame content to flicker in the user's browser when the browser reloads the IFrame with the decorated URL. Ref: https://experienceleague.adobe.com/docs/id-service/using/id-service-api/methods/appendvisitorid.html?lang=en

1 reply

yuhuisg
yuhuisgAccepted solution
New Participant
January 30, 2024

In your <iframe> HTML tag, are there any attributes besides the standard "src" one? IFRAMEs can have attributes that instruct the browser to restrict the data that can be sent between the parent frame and the IFrame, and that could cause issues like what you're observing with your cookie.

One way to make the MCID remain constant in the IFrame is to pass the MCID from your parent domain to your IFrame. You can use ECID's appendVisitorIDsTo method to  "decorate" the IFrame's "src" URL with the MCID. This will have to be done programmatically by your developers. One warning: it could cause the IFrame content to flicker in the user's browser when the browser reloads the IFrame with the decorated URL. Ref: https://experienceleague.adobe.com/docs/id-service/using/id-service-api/methods/appendvisitorid.html?lang=en