Adobe Target experience targeting activities not working when website loaded in iframe | Community
Skip to main content
Level 2
August 31, 2023
Solved

Adobe Target experience targeting activities not working when website loaded in iframe

  • August 31, 2023
  • 1 reply
  • 2600 views

We have enabled Adobe Target experience targeting activities on our website (say www.abc.com). When loading the site directly from browser the activities are working fine.

When our site is been been loaded in another portal(/website) in an iframe say:

<iframe id="frame" src="www.abc.com">
</iframe>

, the target activity is not working.

 

Could you please help in resolving the issue, what could be the cause of issue.

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 rkmk107

Ok, it's difficult to troubleshoot further unless you can provide a link to the page with the iframe. If that's not possible or is a restricted dev environment that can't be accessed outside of company network then I'd suggest raising a ticket with our customer care team


Issue got resolved by adding secureOnly attribute to targetGlobalSettings.

window.targetGlobalSettings = { secureOnly: true, cookieDomain: window.location.hostname };

1 reply

alexbishop
Adobe Employee
Adobe Employee
August 31, 2023

It's difficult to troubleshoot without more information. You're welcome to send more details in a private message, so I can look at the implementation

rkmk107Author
Level 2
September 1, 2023

Hi @alexbishop ,

We are seeing following warning in the browser console when loading our website (having target activity) inside a iframe:

 

Error warning Adobe Target content delivery is disabled. Ensure that you can save cookies to your current domain, there is no "mboxDisable" cookie and there is no "mboxDisable" parameter in query string.

Does this mean if we load our website in an iframe. The target activities created for our website would not work?

alexbishop
Adobe Employee
Adobe Employee
September 1, 2023

With certain domain structures, you need to tell Target which domain to set cookies against, which you can do by setting the cookieDomain value within window.targetGlobalSettings.

How you use it is explained here but for your cookieDomain example it should look something like,

You need to declare this targetGlobalSettings object before you load the Adobe Target script