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
Cross Domain linking in JavaScript tracking client piwik.js #11243
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n a different computer etc
tsteur
added
the
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
label
Jan 20, 2017
Actually I will be changing it to use only one parameter with then 32 characters and also add more validation so cookies cannot be injected |
done |
# Conflicts: # js/piwik.min.js # piwik.js
Beautifully done, I'm impressed 🎉 |
This is AMAZING. Such a useful feature. |
mattab
changed the title
Cross Domain tracking
Cross Domain linking in JavaScript tracking client piwik.js
Feb 28, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To make feature work one has to
setDomains()
enableCrossDomainLinking()
If link is going to different domain that belongs to same Piwik website, it will add two URL parameters:
pk_vid=900d0d1eb6714aa41484879482d2bb13
Where we have 1) visitorId (16 char) 2) the current timestamp (10 char) and 3) a hashed combination of userAgent / platform to make sure when a user shares it, the visitorId won't be applied to another user. Timestamp is only valid for 45 seconds, and only works on same browser / platform when same browser features are enabled.
So far it works for clicks and right click open in new window (if this tracking feature is enabled).
It is important to enable "enableCrossDomainLinking" on the target page (different domain) as well.
Backend part is still missing and needs to be implement later.
@mattab can you have a look when you have time?