Analytics
Record a widget or site analytics event
Records one visitor event (page view, widget open, message sent, identify, purchase) against a Clarm widget. Requests are proxied same-origin to the Clarm analytics service, which authenticates the caller from the widget token or widget id in the payload. Events for a visitor who has opted out should carry tracking_disabled: true, which is accepted and discarded.
post/api/track
Request body
Example request
{
"event": "page_view",
"visitor_id": "v_8f2c19a4",
"widget_id": "1CwmcOQ75KJq"
}Response
Event accepted, or discarded because the visitor opted out.