Collect an analytics event
Records one analytics event. Always returns 204 with an empty body, also when the event is dropped: an invalid body, an excluded IP or path, tracking turned off, or a localhost origin. Send `application/json` with `session_id` (a UUID per visit), `visitor_id` (stable per browser, 8 to 64 characters), `event_type`, `page_path` and `event_time` (ISO 8601). Every other field is optional.
/analytics/eventshttps://api.lynkow.com/storefront/{siteId}Request bodyrequired
event_timestringrequiredRequired. Event time (ISO 8601). A time far from the server clock is replaced by the receive time
event_typeenumrequiredRequired. Kind of event, such as `pageview`, `heartbeat` or `click`
One of:
pageviewscrolltime_on_pagecwvexitheartbeatclickoutbound_linkfile_downloademail_clickphone_clickrage_clickdead_clickcopyform_startform_submitform_abandonform_fieldform_errorheatmap_clickpage_pathstringrequiredRequired. Max 1024 characters
session_idstringrequiredRequired. Analytics session UUID. UUID format
visitor_idstringrequiredRequired. 8-64 characters
browserunionBrowser name
browser_versionunionBrowser version string
click_countunionNumber of clicks recorded for the event
click_elementunionDescriptor of the clicked element
click_element_classunionClass attribute of the clicked element
click_element_idunionID attribute of the clicked element
click_element_tagunionTag name of the clicked element
click_element_textunionText content of the clicked element
click_target_urlunionTarget URL of the clicked link
click_xunionHorizontal click coordinate in pixels
click_yunionVertical click coordinate in pixels
clsunionCumulative Layout Shift score (unitless, Core Web Vital)
content_localeunionLanguage of the page being read. A language the site does not offer is stored as `null`
cookie_visitor_idunionIgnored. Accepted so older trackers keep working: the collector reads the cookie from the request
copied_textunionText copied by the visitor (copy event)
device_typeunionDevice category: desktop, laptop, mobile, tablet
engaged_timeunionActive engagement time in milliseconds (max 3600000)
error_messageunionForm validation or submission error message
fidunionFirst Input Delay in milliseconds (Core Web Vital)
field_nameunionName of the form field involved in the event
field_timeunionTime spent on the form field in milliseconds
field_typeunionType of the form field involved in the event
file_extensionunionExtension of the downloaded file
file_nameunionName of the downloaded file
file_urlunionURL of the downloaded file
form_completion_rateunionForm completion rate as a percentage (0-100)
form_idunionIdentifier of the form involved in the event
form_nameunionName of the form involved in the event
inpunionInteraction to Next Paint in milliseconds (Core Web Vital)
is_entrybooleanSend `true` on the first `pageview` of a visit: it opens the session, and later events only update an open one
is_exitboolean`true` on the event that ends the visit; the page report counts it as an exit from `page_path`
languageunionBrowser language code
lcpunionLargest Contentful Paint in milliseconds (Core Web Vital)
max_scroll_depthunionMaximum scroll depth reached as a percentage (0-100)
osunionOperating system name
os_versionunionOperating system version string
page_referrerunionURL of the referring page
page_titlestringMax 500 characters
page_urlstringMax 2048 characters
referrer_domainunionDomain of the referrer
screen_heightunionScreen height in pixels
screen_widthunionScreen width in pixels
scroll_behaviorunionScroll behavior pattern: reading, skimming, jumping
scroll_depthunionScroll depth as a percentage (0-100)
time_on_pageunionTime on page in milliseconds (max 3600000)
timezoneunionTimezone name (IANA, e.g. Europe/Paris)
traffic_sourceunionTraffic source channel: direct, organic, social, paid, referral, email, internal, ai
ttfbunionTime To First Byte in milliseconds
utm_campaignunionUTM campaign name parameter
utm_contentunionUTM content campaign parameter
utm_mediumunionUTM medium campaign parameter
utm_sourceunionUTM source campaign parameter
utm_termunionUTM term campaign parameter
viewport_heightunionViewport height in pixels
viewport_widthunionViewport width in pixels
visitor_id_sourceenumOne of: cookie, fingerprint, hybrid
One of:
cookiefingerprinthybrid