Sandbox

Tracking

Import the tracking function:

import { trackEvent } from 'utils/js'

And use it like this:

trackEvent(action, {
category,
label = window.location.pathname // should uniquely identify the current page
})

Both action and category are required. The default value for label is the pathname of the current location.