Skip to content

Allow extra parameter for Snowplow events

Axel García requested to merge 323663-improve-tracking-class-on-frontend into master

What does this MR do?

Related to #323663 (closed)

Backend equivalent: !57504 (merged)


We're able to provide an extra key-value pair object to the gitlab_standard context. This MR allows passing this property alongside the event data.

This MR also moves the tracking.js file to its own folder. So we can implement all the improvements outlined in #323663 (closed) (like reducing the file complexity).

  • Move tracking.js file to tracking/index.js and update tests.
  • Add support for extra property on the data argument for raw JS Snowplow events (Tracking.event(category, action, data = {})), and the Snowplow Vue Mixin (this.track(action, data = {}).
  • Allow passing extra data as a data-attribute (data-track-extra='{ "valid_json": true }')
  • Update docs

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Axel García

Merge request reports

Loading