Add snowplow events for timelines (#21008)
* Add a json schema * Pass required data for snowplow events * Pass required data for snowplow events * Add snowplow event tracking for Timeline event creation This changes the timeline_event API endpoint to send snowplow tracking when an event is created. The FE now sends additional information for this purpose: - source: collections or question. This is null if the event is added via API - question_id: added if the source is from a question. null if the question is unsaved. These are dissoc-ed from the body before the db/insert because the backend does not store this information, it's just from the FE and only relevant for this tracking data. * Fix json error * Add ::new-event-created entry to the snowplow test * Fix json error * Fix json error * Fix snowplow test Co-authored-by:Adam James <adam.vermeer2@gmail.com> Co-authored-by:
adam-james <21064735+adam-james-v@users.noreply.github.com>
Showing
- frontend/src/metabase/entities/timeline-events/forms.js 14 additions, 6 deletionsfrontend/src/metabase/entities/timeline-events/forms.js
- frontend/src/metabase/timelines/collections/components/NewEventModal/NewEventModal.tsx 1 addition, 0 deletions...es/collections/components/NewEventModal/NewEventModal.tsx
- frontend/src/metabase/timelines/questions/components/NewEventModal/NewEventModal.tsx 5 additions, 1 deletion...ines/questions/components/NewEventModal/NewEventModal.tsx
- frontend/test/__support__/e2e/helpers/e2e-snowplow-helpers.js 4 additions, 0 deletions...tend/test/__support__/e2e/helpers/e2e-snowplow-helpers.js
- frontend/test/metabase/scenarios/collections/timelines.cy.spec.js 40 additions, 1 deletion.../test/metabase/scenarios/collections/timelines.cy.spec.js
- snowplow/iglu-client-embedded/schemas/com.metabase/timeline/jsonschema/1-0-0 63 additions, 0 deletions...t-embedded/schemas/com.metabase/timeline/jsonschema/1-0-0
- src/metabase/analytics/snowplow.clj 4 additions, 2 deletionssrc/metabase/analytics/snowplow.clj
- src/metabase/api/timeline_event.clj 19 additions, 10 deletionssrc/metabase/api/timeline_event.clj
- src/metabase/models/timeline_event.clj 5 additions, 0 deletionssrc/metabase/models/timeline_event.clj
- test/metabase/analytics/snowplow_test.clj 5 additions, 0 deletionstest/metabase/analytics/snowplow_test.clj
Loading
Please register or sign in to comment