Add basic snowplow enrichers
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
- Run
docker compose -f docker-compose.snowplow.yml create snowplow_enrich
to make sure the new enrichment configs are picked up - Setup the example sdk to work with the devkit as described in the sdk readme
- Go to
examples/vanilla-js/src/index.js
and addhasCookieConsent: true
in line 10 to the invocation ofglClientSdk
so that all data important for the enrichers is sent - To verify the separate enrichers are working:
-
anon_ip: Column
user_ipaddress
last octet should be `x`` -
campaign_attribution: Use http://localhost:8080/?utm_medium=tv&utm_campaign=awesome_campaign and send some events from it. The columns
mkt_campaign
andmkt_medium
should be filled with the respective query params. -
event_fingerprint: Column
event_fingerprint
should be filled. Exclusion of columns in this config is built on suggestion from Snowplow -
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_mediumand
refr_sourceshould be filled with
searchand
Google` -
yauaa: Any event you send should have additional browser information in a context json in
derived_contexts
, including for exampledeviceBrand
anddeviceClass
-
anon_ip: Column
Closes https://gitlab.com/gitlab-org/analytics-section/product-analytics/devkit/-/issues/7