Skip to content

Added click tracking to commit and pipeline link

Katie Macoy requested to merge 348227-package-snowplow-tracking into master

What does this MR do and why?

Adds snowplow click tracking for links to the commit and the pipeline in the package detail view. This data will be used to understand how common of an action it is to click on these links and therefore if we should elevate them more in the UI.

Screen_Shot_2022-07-20_at_20.48.26

Screenshots or screen recordings

https://www.loom.com/share/509615965f774a59ac9c4577a88f1a52

How to set up and validate locally

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

Step Image
1. Publish a package in the package registry via a pipeline. This MR is only applicable for packages published via a pipeline. (For example, instructions for publishing a npm package, pay specific attention to the section on publishing with ci/cd. You must use the CI job token to publish in order to preview this MR). This step can be quite tricky if you've not done it before so feel free to book time with me and we can set it up in a sync call.
2. Enable snowplow micro on GDK (instructions for the gdk, documentation on snowplow micro)
3. Install the snowplow inspector on google chrome as a chrome extension
4. Open gdk, navigate from side menu Packages & Registries > Package Registry
5. Click on a package in the registry that has been published via a pipeline, these are distinguishable by having branch and commit information. Click on one of those packages to get to the detail page Screen_Shot_2022-07-20_at_20.53.55
6. Open developer tools (option, command, i on mac)
7. Press the arrow on the top of developer tools and select snowplow Screen_Shot_2022-06-20_at_14.54.46
8. Click on the commit or pipeline links that this MR has added tracking Screen_Shot_2022-07-20_at_20.48.26
9. When clicking on those items, you'll see a new snowplow event, called a structured event appear. Click on the structured event to see what the event was recorded as Screen_Shot_2022-07-20_at_20.56.12

MR acceptance checklist

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

Related to #348227

Merge request reports