diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-23 21:10:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-23 21:10:52 +0300 |
commit | abd2c6b32aabff4654b6be9cb98b59dcd3193fc4 (patch) | |
tree | fa4464b978bf45b40774bcea2e774b43f36aa27b /doc/development | |
parent | 118083ac69c8cba0bc60633a15b9bb44e5f78281 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development')
-rw-r--r-- | doc/development/internal_analytics/internal_event_instrumentation/migration.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/development/internal_analytics/internal_event_instrumentation/migration.md b/doc/development/internal_analytics/internal_event_instrumentation/migration.md index 79ca45ed84c..7ed1adfb187 100644 --- a/doc/development/internal_analytics/internal_event_instrumentation/migration.md +++ b/doc/development/internal_analytics/internal_event_instrumentation/migration.md @@ -21,7 +21,7 @@ If you are already tracking events in Snowplow, you can also start collecting me The event triggered by Internal Events has some special properties compared to previously tracking with Snowplow directly: 1. The `label`, `property` and `value` attributes are not used within Internal Events and are always empty. -1. The `category` is automatically set to `InternalEventTracking` +1. The `category` is automatically set to the location where the event happened. For Frontend events it is the page name and for Backend events it is a class name. If the page name or class name is not used, the default value of `"InternalEventTracking"` will be used. Make sure that you are okay with this change before you migrate and dashboards are changed accordingly. @@ -73,9 +73,11 @@ import { InternalEvents } from '~/tracking'; mixins: [InternalEvents.mixin()] ... ... -this.trackEvent('action') +this.trackEvent('action', 'category') ``` +If you are currently passing `category` and need to keep it, it can be passed as the second argument in the `trackEvent` method, as illustrated in the previous example. Nonetheless, it is strongly advised against using the `category` parameter for new events. This is because, by default, the category field is populated with information about where the event was triggered. + You can use [this MR](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/123901/diffs) as an example. It migrates the `devops_adoption_app` component to use Internal Events Tracking. If you are using `data-track-action` in the component, you have to change it to `data-event-tracking` to migrate to Internal Events Tracking. |