# Tracking
Component name: <v-tracking>
Function name: trackEvent()
# Component example
Use <v-tracking>
to track an event when the component is loaded or becomes visible on the page.
<div class="app">
<v-tracking
category="Log ud"
action="NemID"
label="https://mit.3f.dk/"
:value="380"
></v-tracking>
</div>
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# Function example
Call the trackEvent
function from inline event handlers to track user actions, e.g clicking a button or succesfully submitting a form.
# API
# Component
Name | Type | Description | Default |
---|---|---|---|
category | String | Event category | - |
action | String | Event action | - |
label | String | Event label | - |
value | Number | Non-negative integer event value | - |
if-visible | Boolean | Use to enable tracking only when component becomes visible | false |
# Function
eventTrack({category, action, label, value})
category
- Event category stringaction
- Event action stringlabel
- Event label stringvalue
- Non-negative integer event value
← Tooltip