You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using two trackers(A and B) on the same page and tracker A have configured:
anonymousTracking: {withSessionTracking: true,}
tracker B attaches an invalid client_session entity (iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2) to all events. The entity is invalid due to the userId is empty string.
Tracker A sets a valid client_session entity with userId : "00000000-0000-0000-0000-000000000000"
To Reproduce
Initialize two trackers from v4 package on a simple webpage:
Expected behavior
Two page views send with the client_session entity attached. Both of them should be valid.
Actual behaviour
Two page views send with the client_session entity attached. tracker_b's client_session entity is invalid because userId is empty string.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: Windows 11
Browser: Edge
Version 130.0.2849.68
Smartphone (please complete the following information):
Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]
Additional context
If setting the cookieName to different values on the two trackers this bug seems to go away.
The text was updated successfully, but these errors were encountered:
Hi @dkbrkjni, thank you for reporting the issue! I can confirm that this is the case and is a bug in the tracker.
The reason for this is that both initialized trackers share the same cookie value for user and session information. Since one tracker has anonymous tracking enabled, it omits writing the user id in the cookie. The other tracker is not aware of the anonymous tracking setting, so thinks the empty user id is valid.
If you are running into this problem and are looking for a workaround, setting the cookieName property in the newTracker call will enable you to make each tracker use a different cookie and thus not conflict on the anonymous tracking config. But this will also mean that the trackers will track different user and session identifiers.
Describe the bug
When using two trackers(A and B) on the same page and tracker A have configured:
tracker B attaches an invalid client_session entity (iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2) to all events. The entity is invalid due to the
userId
is empty string.Tracker A sets a valid client_session entity with
userId : "00000000-0000-0000-0000-000000000000"
To Reproduce
Expected behavior
Two page views send with the client_session entity attached. Both of them should be valid.
Actual behaviour
Two page views send with the client_session entity attached. tracker_b's client_session entity is invalid because
userId
is empty string.Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
If setting the
cookieName
to different values on the two trackers this bug seems to go away.The text was updated successfully, but these errors were encountered: