Collect an analytics event

Ingest one analytics event. The endpoint is fire-and-forget: it always responds 204 No Content with an empty body, whether the event was recorded or silently dropped (validation error, excluded IP, excluded path, tracking disabled on the site, or a localhost origin). This is by design to avoid client-side error noise. The body field set follows the `collectAnalyticsValidator` schema (event name, page path, optional properties).

POST/analytics/events
Base URLhttps://api.lynkow.com/storefront/{siteId}

Request body
required

  • os
    union

    Operating system name

  • cls
    union

    Cumulative Layout Shift score (unitless, Core Web Vital)

  • fid
    union

    First Input Delay in milliseconds (Core Web Vital)

  • inp
    union

    Interaction to Next Paint in milliseconds (Core Web Vital)

  • lcp
    union

    Largest Contentful Paint in milliseconds (Core Web Vital)

  • ttfb
    union

    Time To First Byte in milliseconds

  • browser
    union

    Browser name

  • click_x
    union

    Horizontal click coordinate in pixels

  • click_y
    union

    Vertical click coordinate in pixels

  • form_id
    union

    Identifier of the form involved in the event

  • is_exit
    boolean

    Boolean

  • visible
    boolean

    Boolean

  • file_url
    union

    URL of the downloaded file

  • is_entry
    boolean

    Boolean

  • language
    union

    Browser language code

  • page_url
    string

    Max 2048 characters

  • timezone
    union

    Timezone name (IANA, e.g. Europe/Paris)

  • utm_term
    union

    UTM term campaign parameter

  • file_name
    union

    Name of the downloaded file

  • form_name
    union

    Name of the form involved in the event

  • page_path
    string
    required

    Required. Max 1024 characters

  • event_time
    string
    required

    Required

  • event_type
    enum
    required

    Required. One of: pageview, scroll, time_on_page, cwv, exit, heartbeat, click, outbound_link, file_download, email_click, phone_click, rage_click, dead_click, copy, form_start, form_submit, form_abandon, form_field, form_error, heatmap_click

    One of: pageviewscrolltime_on_pagecwvexitheartbeatclickoutbound_linkfile_downloademail_clickphone_clickrage_clickdead_clickcopyform_startform_submitform_abandonform_fieldform_errorheatmap_click

  • field_name
    union

    Name of the form field involved in the event

  • field_time
    union

    Time spent on the form field in milliseconds

  • field_type
    union

    Type of the form field involved in the event

  • os_version
    union

    Operating system version string

  • page_title
    string

    Max 500 characters

  • session_id
    string
    required

    Required. Analytics session UUID

  • utm_medium
    union

    UTM medium campaign parameter

  • utm_source
    union

    UTM source campaign parameter

  • visitor_id
    string
    required

    Required. 8-64 characters

  • click_count
    union

    Number of clicks recorded for the event

  • copied_text
    union

    Text copied by the visitor (copy event)

  • device_type
    union

    Device category: desktop, laptop, mobile, tablet

  • utm_content
    union

    UTM content campaign parameter

  • engaged_time
    union

    Active engagement time in milliseconds (max 3600000)

  • screen_width
    union

    Screen width in pixels

  • scroll_depth
    union

    Scroll depth as a percentage (0-100)

  • time_on_page
    union

    Time on page in milliseconds (max 3600000)

  • utm_campaign
    union

    UTM campaign name parameter

  • click_element
    union

    Descriptor of the clicked element

  • error_message
    union

    Form validation or submission error message

  • page_referrer
    union

    URL of the referring page

  • screen_height
    union

    Screen height in pixels

  • file_extension
    union

    Extension of the downloaded file

  • traffic_source
    union

    Traffic source channel: direct, organic, social, paid, referral, email, internal, ai

  • viewport_width
    union

    Viewport width in pixels

  • browser_version
    union

    Browser version string

  • referrer_domain
    union

    Domain of the referrer

  • scroll_behavior
    union

    Scroll behavior pattern: reading, skimming, jumping

  • viewport_height
    union

    Viewport height in pixels

  • click_element_id
    union

    ID attribute of the clicked element

  • click_target_url
    union

    Target URL of the clicked link

  • max_scroll_depth
    union

    Maximum scroll depth reached as a percentage (0-100)

  • click_element_tag
    union

    Tag name of the clicked element

  • cookie_visitor_id
    union

    Visitor UUID from the consent cookie (set when consent is given)

  • visitor_id_source
    enum

    One of: cookie, fingerprint, hybrid

    One of: cookiefingerprinthybrid

  • click_element_text
    union

    Text content of the clicked element

  • click_element_class
    union

    Class attribute of the clicked element

  • form_completion_rate
    union

    Form completion rate as a percentage (0-100)

Feedback

Was this page helpful?