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
Multiple inclusions of Matomo across different versions breaks functionality #13007
Comments
You want to track the same site into multiple matomo instances? Guess this post should help: https://matomo.org/blog/2017/02/complete-guide-tracking-websites-web-apps-multiple-piwiks-easily-efficiently/ |
I agree, you can find more about this idea here: https://forum.matomo.org/t/rename-paq-possible/27460 |
Thanks for sending those URLs, we've checked them earlier but together they may solve our requirements. We have checked it out previously but the issue in its core is that we have clients who from one agency include Piwik, and then they include our (other version) of Piwik; and then bad things happen. Especially if the previous included Piwik major version differs. |
What exactly isn't working? I don't recall too many changes in the tracker or tracker API since the last major version. The only problem I can see is that the Otherwise depends how you embed the various trackers and how everything is defined. Likely the problem is really due to multiple |
Really appreciate how helpful you are with this issue. And any further pointers in the right direction would be great. But we thought initially that it would be possible to just rename _paq-variable, or in any other way not reveal "our" version of the script to the outside world by variable scoping. If we could easily rename piwik.js, and window.piwik (or the equivalent) and the _paq-variable it would be a godsend, but wouldn't really fix the issue for real. The actual error is this: And is caused when a client (such as a company) includes piwik/matomo (often different versions, maybe version 2 or version 3, etctera) from different agencies that help them with tracking. |
|
Hi, It would be great if we could easily rename, or even better, use a local variable scoped inside our tag, not shared with other third party tags. |
I don't think renaming _paq would help much when using two different Piwik/Matomo versions when some methods aren't available. That's because once I doubt we will be working on this here soon. I would highly! recommend to get the people to update their Piwik 1 and Piwik 2 to the latest Matomo for security purposes etc which fixes the problem as well but I understand you can't get other companies to do that... |
We have seen issues where a client already is including Matomo (or older Piwik-versions) from a third party provider, and then they include our instance of Piwik/Matomo. Regular script-tag inclusion with your tags.
This non-encapsulation creates issues where they (kind of) override each other and results in crashes, especially if several different versions of Piwik/Matomo from different providers, is included where versions may differ.
How would we go about solving this issue; and encapsulating (namespacing?) one instance to not be able to get modified by other inclusions of the same software?
The text was updated successfully, but these errors were encountered: