Skip to content

Add Gitlab Internal Events to Frontend to unify RedisHLL/Snowplow

Problem

To deprecate the existing RedisHLL / Snowplow tracking and replace it with a unified API we need to provide such an API on the Frontend. Currently, we only have a first iteration on the backend, see #407858 (closed).

Desired Outcome

We have one API on the frontend, which, with a single call, tracks an Event via Snowplow but also increments an according RedisHLL counter similar to the backend at #407858 (closed).

Potential Solution

  1. Add a new method to the mixin at https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/tracking/tracking.js e.g. called trackInternalEvent. It should work like the current track method, but send the event to both RedisHLL, via the RedisHLL API method and Snowplow, while automatically attaching the correct Service Ping Context
  2. Convert the two events in devops_adoption_app.vue to use this method instead of the separate calls to RedisHLL/Snowplow tracking. See i_analytics_dev_ops_score and i_analytics_dev_ops_adoption
  3. Investigate whether we can change the label of the event send to snowplow, since for service ping replication only the event name in the context should be needed.

Use the calls in devops_adoption_app.vue as an example

Edited by Sebastian Rehm