Skip to content

Add UI to Product Analytics feature

Dmytro Zaporozhets (DZ) requested to merge product-analytics-ui into master

What does this MR do?

This MR adds some basic UI to Product Analytics feature.

Details:

  • Feature is behind the feature flag and is disabled by default.
  • Events page is just landing page with last 20 events rendered there. In future 2 more pages with graphs will be added.
  • The feature has setup page that tells user JS script they need to put in their application for tracking to work.
  • This feature has test page that creates a sample product analytics event (by simply rendering js tracker into the page).
  • Ships with sp.js file which is bundle of snowplow javascript tracker. Must be publicly accessible and persistent URL so in /public.

Based on !27730 (closed).

Part of #225167 (closed)

Questions and answers

Q: How its different from existing snowplow integration?

A: Everything in https://docs.gitlab.com/ee/development/telemetry/snowplow.html is about tracking GitLab usage and see results somewhere. This MR is about tracking app usage somewhere and seeing results in GitLab.

Q: How to use this feature?

A: The flow is next:

  1. User creates project X on GitLab
  2. User visits product analytics > setup page and receives a JS snippet
  3. They put the snippet into their app (like you do with google analytics). Let's say MyApp.
  4. Every time someone uses MyApp it executes the snippet.
  5. The snippet loads JS code from whatever.gitlab.instance/-/sp.js.
  6. The js code creates a tracking event and send it to whatever.gitlab.instance/-/collector.
  7. User visits their GitLab project X again and see all events from MyApp in our UI.

Screenshots

Screenshot_2020-07-15_at_18.53.45

Screenshot_2020-07-15_at_19.35.38

Screenshot_2020-07-15_at_19.35.34

Screenshot_2020-07-15_at_19.35.27

Does this MR meet the acceptance criteria?

Conformity

Edited by Dmytro Zaporozhets (DZ)

Merge request reports

Loading