Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load tracking site from Iframe #18815

Closed
peterhashair opened this issue Feb 17, 2022 · 4 comments
Closed

Load tracking site from Iframe #18815

peterhashair opened this issue Feb 17, 2022 · 4 comments
Labels
c: Documentation For issues related to in-app product help messages, or to the Matomo knowledge base. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. worksforme The issue cannot be reproduced and things work as intended.

Comments

@peterhashair
Copy link
Contributor

peterhashair commented Feb 17, 2022

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']);
    }
}
@peterhashair peterhashair added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. c: Documentation For issues related to in-app product help messages, or to the Matomo knowledge base. labels Feb 17, 2022
@tsteur
Copy link
Member

tsteur commented Feb 17, 2022

@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

This comment was marked as off-topic.

@tsteur
Copy link
Member

tsteur commented Feb 17, 2022

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

@peterhashair
Copy link
Contributor Author

@tsteur will do.

@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. worksforme The issue cannot be reproduced and things work as intended. labels Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Documentation For issues related to in-app product help messages, or to the Matomo knowledge base. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants