Tracking

Actions

Actions available for implementation in tracking connector apps

Canonical actions define the event-tracking contract between the frontend and your connector app. When you build a tracking connector, you implement an action handler for the track action so the frontend can send analytics events (page views, add-to-cart, checkout) to your tracking backend.

Import these from @laioutr-core/canonical-types/tracking.

Event

EventTrackAction

tracking/event/track
Track an analytics event (page views, add-to-cart, checkout, and more). All properties except eventType are optional, as each property is only applicable to certain event types.
eventType
stringrequired
eventTime
number
uri
string
referrerUri
string
pageViewId
string
entity
string
experimentIds
string[]
categories
string[]
cartId
string
attributes
Record<string, string[]>