Skip to content

Feat: extract tracker out of tracking

What does this MR do and why?

Background

Since GitLab.inc uses Snowplow as the tracker and no alternative trackers were allowed to added to the instance, and Jihu needs to use other 3rd party tracker on its own. In order to introduce an alternative tracker on Jihu's side, we need to extract the common APIs to map to without introducing additional code on the upstream. That is why this MR is here.

Changes included in this MR

It basically does two things:

  1. Extract the methods for tracking under tracking.js to tracker.js
  2. Add entry for importing Jihu's tracker.js.

Additional changes:

Basically the existing Tracking class only uses static methods, I think we can refactor them as plain object which would be better for encapsulation.

  • Extract tracking methods to tracker.js
  • Add tracking entry for Jihu.

/cc @prajnamas

Describe in detail what your merge request does and why.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Wu Jeremy

Merge request reports

Loading