Skip to content

Add client_session context entity if anonymous tracking with session tracking is enabled #1124

Description

Is your feature request related to a problem? Please describe.
In case one creates tracker with the following configuration:

snowplow('newTracker', 'sp', '{{collector_url_here}}', {
  ...
  anonymousTracking: { withSessionTracking: true },
  contexts: {
    session: true
  }
);

The session context entity is not added to events even though sessions are tracked.

This is because of the check on this line which doesn't allow the session entity to be added in case anonymous tracking is enabled.

Describe the solution you'd like
Session entity should be added if anonymous tracking with session tracking is enabled. However, the userId property in the entity should be a null UUID: 00000000-0000-0000-0000-000000000000

Metadata

Metadata

Labels

type:enhancementNew features or improvements to existing features.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions