Skip to content

Add basic snowplow enrichers

Sebastian Rehm requested to merge bastirehm-add-basic-enrichers into main

Overview

This adds five basic enrichers as agreed upon in https://gitlab.com/gitlab-org/analytics-section/product-analytics/devkit/-/issues/7, which derive additional data from the singular events.

How to test

  1. Run docker compose -f docker-compose.snowplow.yml create snowplow_enrich to make sure the new enrichment configs are picked up
  2. Setup the example sdk to work with the devkit as described in the sdk readme
  3. Go to examples/vanilla-js/src/index.js and add hasCookieConsent: true in line 10 to the invocation of glClientSdk so that all data important for the enrichers is sent
  4. To verify the separate enrichers are working:
    1. anon_ip: Column user_ipaddress last octet should be `x``
    2. campaign_attribution: Use http://localhost:8080/?utm_medium=tv&utm_campaign=awesome_campaign and send some events from it. The columns mkt_campaign and mkt_medium should be filled with the respective query params.
    3. event_fingerprint: Column event_fingerprint should be filled. Exclusion of columns in this config is built on suggestion from Snowplow
    4. referer_parser: Go to https://www.google.com, open your browser console and enter window.open('http://localhost:8080') and then send some events. Column refr_mediumandrefr_sourceshould be filled withsearchandGoogle`
    5. yauaa: Any event you send should have additional browser information in a context json in derived_contexts, including for example deviceBrand and deviceClass

Closes https://gitlab.com/gitlab-org/analytics-section/product-analytics/devkit/-/issues/7

Merge request reports