Skip to content


calling piwikTracker.getVisitorId() early causes random ID to return, not persisted #2315

mattab opened this Issue · 3 comments

2 participants

Piwik Open Source Analytics member

when calling JS API piwikTracker.getVisitorId() early (before the trackPageView() call) the returned ID will be a random one, not actually used by Piwik later. Instead, loadVisitorCookie should set the cookie when it's not already set.

Piwik Open Source Analytics member

(In [4462]) Fixes #2315 and updating tests (starting to love these JS tests ;)


The code should only persist uuid (in a variable).

The current code fails for a new visitor when you call getVisitorId() and then trackPageView() because the saved cookie will incorrectly be treated as a return visitor.


(In [4475]) fixes #2315

@mattab mattab added this to the Piwik 1.3 milestone
@mattab mattab self-assigned this
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.