@peterhashair opened this Issue on February 17th 2022 Contributor

So when you have Matomo tracking set in a.com, then use a.com as an iframe in b.com, it causes js errors around cookie can't be set across the domain, this case is rare.

But I guess user could check if a.com is load as iframe, then disable matomo cookies maybe?

function checkIsInIframe () {
    try {
        return window.self !== window.top;
    } catch (e) {
     _paq.push(['disableCookies']);
    }
}
@tsteur commented on February 17th 2022 Member

@peterhashair I'm not really sure what you mean here? Does maybe https://matomo.org/faq/how-to/how-do-i-track-a-website-within-an-iframe/ help?

@peterhashair commented on February 17th 2022 Contributor

@tsteur eg: this site. https://www.worxogo.com/ has load a iframe.
iframe has the matomo.js tracking code.

It returns js errors on https://www.worxogo.com/. JS console.

@tsteur commented on February 17th 2022 Member

@peterhashair did you check out the FAQ and whether the site is setting it?

@peterhashair commented on February 18th 2022 Contributor

@tsteur will do.

This Issue was closed on February 18th 2022
Powered by GitHub Issue Mirror