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

Closed
mattab opened this Issue Apr 15, 2011 · 3 comments

2 participants

@mattab
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.

@mattab
Piwik Open Source Analytics member

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

@robocoder

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.

@robocoder

(In [4475]) fixes #2315

@mattab mattab added this to the Piwik 1.3 milestone Jul 8, 2014
@mattab mattab self-assigned this Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment