Skip to content

Adjusts snowplow to use cookies for sessions

Jeremy Jackson requested to merge ee-user-tracking-settings into master

What does this MR do?

It changes the way that snowplow stores session ids. The current behavior is to use local storage, but the challenge comes up with session expiration, which doesn't appear to naturally happen in snowplow by default.

Closes https://gitlab.com/gitlab-org/telemetry/issues/77

This also restructures where the configuration for snowplow lives, which will give us some flexibility with adding new features behind feature flags as we roll out new tracking behaviors.

CE MR - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/32236 Original MR that was reverted - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31826

Does this MR meet the acceptance criteria?

Changelog: I've not created a changelog entry, but let me know if there should be one

Conformity

Performance and Testing

I've changed the timing for when snowplow('enableActivityTracking', 30, 30) and snowplow('trackPageView') are called. They're now on DOM ready, which may improve tracking, but may also impact the performance negatively (before they weren't really doing much, as far as I can tell). I've kept these behind a feature flag, so we should be able to roll this out and figure that out, but I'm open to ideas/guidance here.

Merge request reports

Loading