-
-
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
piwik.js: Cross domain tracking #2211
Comments
Cross-domain linking works by the referring site adding parameters to the URL which the receiving site parses. (It's a little trickier with form submissions, but also doable.) The main limitation is that first party cookies cannot be shared across different top level domains, i.e., x.com and y.com. If we implement this feature, I propose:
|
Maybe: tracker.enableCrossDomainLinker( boolCopyCookies ); |
tracker.enableCrossDomainsLinker (with a "s") maybe? was your idea to pass the parameters, automatically on all clicks to domains that were specified in setDomains('y.com') ? I think it's a must have indeed (especially with Ecommerce sites). |
I envision it being automatic. |
Notes
Update 2014: In Universal analytics it is done this way:
on third party domain add
See also this forum post |
+1 |
1 similar comment
+1 |
I think we can partially accomplish it by exposing a setVisitorId method on the JS tracker, it will still require manual work for reading, and transferring the visitor id between domains, but it's still better then the current situation. |
Yes, I believe that's already done and the docs are here: http://piwik.org/docs/user-id/ |
+100 |
PR: #11243 |
Cross domain tracking is available in Piwik 3.0.2-b1 release. To use it configure it as follows in the Piwik Tracker code: _paq.push(['setDomains', ['domain-1.net', 'domain-2.net']]);
_paq.push(['enableCrossDomainLinking']);
_paq.push(['setSiteId', X]); (when adding both these lines in domain-1.net and domain-2.net -> users clicking from either website to the other website, will be automatically recognised as the same visitor and tracked in the same visit in website id X) |
Before closing the issue:
|
We need to clearly mention it needs to be enabled on all domains / websites
We should do it actually as part of this issue, it is in most cases not working without it. |
Note: Cross Domain feature is also useful when the data is tracked into different websites in Piwik. In that case, there won't be just "one visit" created, but "one visit per website". The advantage of using cross domains is that those two visits across website IDs will have the same Visitor ID. Could be super useful and we need to mention it in docs 👍 |
Important:
|
To record users across multiple domain names in the same Piwik website, we need to setup what is called Cross Domain linking. Cross domain tracking in Piwik makes sure that when the visitor visits multiple websites and domain names, the visitor data will be stored in the same visit and that the visitor ID is reused across domain names. A typical use case where cross domain is needed is for example when an ecommerce online store is on www.awesome-shop.com and the ecommerce shopping cart technology is on another domain such as secure.cart.com. Learn about setting up cross-domain tracking in our guide: How do I accurately measure a same visitor across multiple domain names (cross domain linking)? Refs matomo-org/matomo#2211
|
* Tracking multiple domain names in the same website To record users across multiple domain names in the same Piwik website, we need to setup what is called Cross Domain linking. Cross domain tracking in Piwik makes sure that when the visitor visits multiple websites and domain names, the visitor data will be stored in the same visit and that the visitor ID is reused across domain names. A typical use case where cross domain is needed is for example when an ecommerce online store is on www.awesome-shop.com and the ecommerce shopping cart technology is on another domain such as secure.cart.com. Learn about setting up cross-domain tracking in our guide: How do I accurately measure a same visitor across multiple domain names (cross domain linking)? Refs matomo-org/matomo#2211 * few minor changes * Update tracking-javascript-guide.md
(ticket description updated by @mattab)
The goal of this ticket is to be able to measure a unique user across several domain names, by having Piwik.js automatically forwarding the User ID for this user in the URL as a query parameter.
Details
First party cookie by design will be only created and available in this domain where they were created. To allow for accurate cross-domains reporting, we need a way to persist the UUID (unique identifier) in the first party cookie from one domain to another domain.
The solution is to implement a mechanism that automatically decorates DOM elements within the page, which are links, and will add a GET Parameter to links, with the User ID.
Note: this feature has been available in Google universal analytics forever, and is well documented here: Universal analytics cross domain tracking. (this is a must read!)
Maybe in Piwik we can support the following methods:
Notes
The text was updated successfully, but these errors were encountered: