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

Expose setVisitorId JS tracker method #16042

Merged
merged 3 commits into from Jun 9, 2020
Merged

Expose setVisitorId JS tracker method #16042

merged 3 commits into from Jun 9, 2020

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Jun 8, 2020

Noticed only in #15593 (comment) that it's actually not exposed. As we need this in one of our projects ourselves adding this to 3.x-dev. Will reference that PR where we use it as well. Had this already implemented in another repo not knowing it wasn't working.

we'll also need to document this afterwards on the JS tracker API.

fixes #12777

@tsteur tsteur added the Needs Review PRs that need a code review label Jun 8, 2020
@tsteur tsteur added this to the 3.13.7 milestone Jun 8, 2020
@tsteur
Copy link
Member Author

tsteur commented Jun 8, 2020

build js

@@ -3216,6 +3217,11 @@ function getVisitorIdFromCookie(tracker) {
var visitorId = tracker.getVisitorId();
equal(visitorId, tracker.getVisitorId(), "Visitor ID is the same when called multiple times");

tracker.setVisitorId('invalid'); // invalid characters
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setVisitorId is also tested in many other places in the tests

@tsteur tsteur merged commit 210e566 into 3.x-dev Jun 9, 2020
@tsteur tsteur deleted the exposesetvisitorid branch June 9, 2020 19:55
tsteur added a commit to matomo-org/developer-documentation that referenced this pull request Jun 11, 2020
@mattab mattab added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Jun 12, 2020
jonasgrilleres pushed a commit to 1024pix/pix-analytics that referenced this pull request Sep 22, 2020
jbuget pushed a commit to 1024pix/pix-analytics that referenced this pull request Sep 26, 2020
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. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants