Commit a42a6d5e authored by Fiona Neill's avatar Fiona Neill

Merge branch 'docs-aakgun-vue-mixin-doc' into 'master'

Update Vue tracking mixing docs

See merge request gitlab-org/gitlab!72692
parents b5adc9fe beff0dfd
......@@ -102,14 +102,12 @@ track_action: "click_button" })
### Implement Vue component tracking
For custom event tracking, use a Vue `mixin` in components. Vue `mixin` exposes the `Tracking.event`
static method and the `track` method called from components or templates. You can specify tracking
options in `data` or `computed`. These options override any defaults and allow the values to be dynamic
from props or based on state.
static method and the `track` method. You can specify tracking options in `data` or `computed`.
These options override any defaults and allow the values to be dynamic from props or based on state.
Default options are passed when an event is tracked from the component. If you don't specify an option,
the default `document.body.dataset.page` is used. The default options are:
Several default options are passed when an event is tracked from the component:
- `category`
- `category`: If you don't specify, by default `document.body.dataset.page` is used.
- `label`
- `property`
- `value`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment