Conditions for recording iframe content
Session Replay supports the recording of content that is embedded in an iframe
element. This content can be recorded if one of the following conditions is met:
The domains of the parent and child windows are the same
-
Install a tag with Session Replay in the parent window. If both windows have the same tag, make sure it has Session Replay enabled.
The tag is optional in the child window, or a different tag may be installed. In this case, add the
childIframe:true
parameter to the code snippet of the tag that is installed in the parent window. By default, it's set tofalse
.ym(XXXXXX, "init", { childIframe:true, clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true, trackHash:true });
where
XXXXXX
is the number of the tag installed.
The domains of the parent and child windows are different
-
-
Place the same ad tag with Session Replay enabled in both windows.
-
Add the
trustedDomains
parameter to the code snippet of the tag that was placed in the child window.ym(XXXXXX, "init", { trustedDomains: ["example.com"], clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true, trackHash:true });
where
XXXXXX
is the number of the tag installed.example.com
is the domain of the parent window. You can specify multiple domains by separating them with a comma. This may be useful if the parent window is hosted on subdomains.ym(XXXXXX, "init", { trustedDomains: ["example.com", "sub.example.com"], ... });
-
Useful links |
Online training |