Upscope will work with iframes without you needing to do anything when these are hosted on the same domain. This means that the part of the url between ://  and /  is exactly the same.

You'll need to make changes to your website to make iframes work in other instances.

NB: You do not need to do anything to make Upscope work cross-domain unless iframes are involved.

Same domain (e.g. main page is "https://acme.com/index" and iframe is "https://acme.com/account")

You do not need to do anything.

Same base domain (e.g. main page is "https://app.acme.com/index" and iframe is "https://accounts.acme.com/me")

If the main page and the iframe share the same base domain (i.e. the domains have the same ending) you'll need to add the following code to both pages, before the Upscope code:

<script>
document.domain = "BASE_DOMAIN";
</script>

where BASE_DOMAIN  is the base domain (the part of the domain both pages share).
You only need to add the Upscope code to the main page (the outermost one).

Different domains

If the main page and the iframe are on different domains altogether, you can add the Upscope code to both the outer page and the iframe. This might cause some problems and sometimes it won't be rendered properly and we are working to make this a better experience.

Did this answer your question?