Conditions for recording iframe content

Session Replay 2.0 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 2.0 in the parent window. If both windows have the same tag, make sure it has Session Replay 2.0 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 to false.

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
  1. Install the same tag with Session Replay 2.0 enabled in both windows.
  2. Add the trustedDomains parameter to the code snippet of the tag installed 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"],
        ...
    });

Select a question to find a solution.

Do the following:

  • Clear the browser cache.
  • Disable all plugins and browser extensions.
  • Delete browser cookies.
  • Check the firewall settings. The firewall may be blocking the Yandex.Metrica tag script. The tag could also be blocked by the Adblock Plus extension.

If you have more questions about Session Replay, submit them in the form below. Provide an example of a session with incorrectly displayed data and specify the full version of your browser.