Snowplow tracking event value property must be a decimal
There are a few places in our documentation and in the code where we are not properly specifying or enforcing the fact that the value
property of a Snowplow structured event (via window.snowplow('trackStructEvent', …)
or Gitlab::Tracking.event(…)
) must be of type decimal (i.e. an integer or float).
In order to be consistent with ourselves and to provide developers with the most accurate information, we should fix it in the following places:
-
Fix (or remove) default value
getting set intracking.js
-
Fix (or remove) the related specs for that change in tracking_spec.js
- https://gitlab.com/gitlab-org/gitlab/-/blob/v13.4.1-ee/spec/frontend/tracking_spec.js#L131
- https://gitlab.com/gitlab-org/gitlab/-/blob/v13.4.1-ee/spec/frontend/tracking_spec.js#L144
- https://gitlab.com/gitlab-org/gitlab/-/blob/v13.4.1-ee/spec/frontend/tracking_spec.js#L158
- https://gitlab.com/gitlab-org/gitlab/-/blob/v13.4.1-ee/spec/frontend/tracking_spec.js#L168
- https://gitlab.com/gitlab-org/gitlab/-/blob/v13.4.1-ee/spec/frontend/tracking_spec.js#L174
- https://gitlab.com/gitlab-org/gitlab/-/blob/v13.4.1-ee/spec/frontend/tracking_spec.js#L204
- https://gitlab.com/gitlab-org/gitlab/-/blob/v13.4.1-ee/spec/frontend/tracking_spec.js#L219
- https://gitlab.com/gitlab-org/gitlab/-/blob/v13.4.1-ee/spec/frontend/tracking_spec.js#L228
-
Fix the documentation on how to properly use the value
property- https://gitlab.com/gitlab-org/gitlab/-/blob/v13.4.1-ee/doc/development/telemetry/snowplow.md#L136
- https://gitlab.com/gitlab-org/gitlab/-/blob/v13.4.1-ee/doc/development/telemetry/snowplow.md#L180
- https://gitlab.com/gitlab-org/gitlab/-/blob/v13.4.1-ee/doc/development/telemetry/snowplow.md#L212
- https://gitlab.com/gitlab-org/gitlab/-/blob/v13.4.1-ee/doc/development/telemetry/snowplow.md#L281
- https://gitlab.com/gitlab-org/gitlab/-/blob/v13.4.1-ee/doc/development/telemetry/snowplow.md#L294
Edited by Rajendra Kadam