-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Make tracking several site IDs easier to users implementing Piwik using Asynchronous javascript #5049
Comments
Isn't there already a setSiteId method? What exactly is to do here? |
Found the problem in current implementation, it always calls all setSiteId methods first... So we can either fix this or make two trackers work in async mode by using callback methods |
Maybe proper solution is to throw an exception when setSiteId is pushed more than once? |
…pplied first, are registered multiple times. We do not throw an error as this would prevent script execution
It is a common use case to want to track the data in two different websites in Piwik, for example one website for the current website and another one for the "aggregate" websites collecting data across several domains.
In this case here is the recommended practise: http://developer.piwik.org/api-reference/tracking-javascript#multiple-piwik-trackers
The goal of this ticket is to remove this bracket from the documentation: '(ie. this will not work with the asynchronous tag)' and make it work when calling
.push( 'setSiteId', X )
with X and Y.This will also resolve a few support issues as this question occurs fairly often!
The text was updated successfully, but these errors were encountered: