diff --git a/doc/development/internal_analytics/internal_event_instrumentation/quick_start.md b/doc/development/internal_analytics/internal_event_instrumentation/quick_start.md index 271cb5f98a6e32d33148e0973390d0b1b9d29a96..15ad4266d1bbf33e29f8fb4bd5bcb64105c4ed41 100644 --- a/doc/development/internal_analytics/internal_event_instrumentation/quick_start.md +++ b/doc/development/internal_analytics/internal_event_instrumentation/quick_start.md @@ -148,3 +148,27 @@ Sometimes we want to send internal events when the component is rendered or load = render Pajamas::ButtonComponent.new(button_options: { data: { event_tracking_load: 'true', event_tracking: 'i_devops' } }) do = _("New project") ``` + +### Props + +Apart from `eventName`, the `trackEvent` method also supports `extra` and `context` props. + +`extra`: Use this property to append supplementary information to GitLab standard context. +`context`: Use this property to attach an additional context, if needed. + +The following example shows how to use the `extra` and `context` props with the `trackEvent` method: + +```javascript +this.trackEvent('i_code_review_user_apply_suggestion', { + extra: { + projectId : 123, + }, + context: { + schema: 'iglu:com.gitlab/design_management_context/jsonschema/1-0-0', + data: { + 'design-version-number': '1.0.0', + 'design-is-current-version': '1.0.1', + }, + }, +}); +```