Skip to content

Event reference

Every event the tag fires automatically (from data-p-event or convention). Custom events you fire via window.periscale.track() are forwarded as-is.

Lifecycle

EventWhen
$pageviewInitial page load and any client-side route change.
$pageleavePage is hidden or unloaded.
page_not_foundPage rendered with data-p-not-found or path matches a 404 route.

Auth

EventWhen
user_logged_inFire after successful login.
user_signed_upFire after successful signup.
user_logged_outFire on logout.

Products

EventWhen
product_viewedA [data-p-product-id] element scrolls into view.
product_clickedA [data-p-event="product_clicked"] element is clicked.
product_options_openedQuick-view / variant overlay is opened.
product_image_viewedCarousel index changes.
image_zoom_openedZoom modal is opened.
image_load_failedAn image inside an instrumented region fails to load.

Cart

EventWhen
add_to_cartClick on a [data-p-event="add_to_cart"] element.
add_to_cart_disabledClick on a disabled add-to-cart with data-p-event="add_to_cart_disabled".
product_removed_from_cartClick on a [data-p-event="remove_from_cart"] element.
cart_quantity_updatedQuantity input value changes.
cart_viewedVisitor lands on cart route or opens cart drawer.
cart_clearedCart is emptied.
quantity_changedA quantity stepper button is clicked.
variant_selectedA variant button is clicked.

Wishlist · Search · Catalog

EventWhen
wishlist_add, wishlist_removeClick on the wishlist toggle.
product_searchedSearch form submitted; search_query extracted from input.
search_result_clickedA product link inside the /search route is clicked.
catalog_filter_appliedURL search params change on a catalog route.
catalog_sort_changedA sort selector value changes.

Checkout · Payment

EventWhen
checkout_startedVisitor lands on the /checkout route.
checkout_completedA [data-p-event="checkout_completed"] element is rendered.
coupon_appliedA coupon form is submitted.
order_placedA [data-p-event="order_placed"] element with data-p-total is rendered.
payment_initiated, payment_completed, payment_failedFire from your checkout integration.

UI · Forms

EventWhen
mega_menu_opened, mobile_menu_openedMenu state mutates to open.
announcement_dismissedClick on a dismiss button with data-p-event="announcement_dismissed".
hero_slide_viewedHero carousel index changes.
form_validation_errorA form field gets aria-invalid="true".
form_abandonedVisitor types in a [data-p-form] form then leaves without submitting.
contact_form_submittedContact form with data-p-event="contact" is submitted.
newsletter_signup_attemptedNewsletter form with data-p-event="newsletter" is submitted.

Engagement

EventWhen
scroll_depth_reachedEach of the 25 / 50 / 75 / 100% thresholds, once per route.
time_on_pageFires on $pageleave with duration_ms and active_ms (excludes time the tab was hidden).
rage_click3+ clicks on the same element within 800 ms.
dead_clickA click on an element that didn't navigate or change the DOM.

Performance

EventWhen
web_vital_lcpLargest Contentful Paint, on pagehide.
web_vital_inpInteraction to Next Paint (worst), on pagehide.
web_vital_clsCumulative Layout Shift, on pagehide.
web_vital_fcpFirst Contentful Paint.
web_vital_ttfbTime to First Byte.

Errors

EventWhen
$exceptionwindow.onerror or unhandled promise rejection.
api_errorA fetch() to your API returned a non-2xx status.
slow_api_responseA fetch() took longer than 2 seconds.

Cross-surface

EventWhen
chat_widget_opened, chat_widget_closedPeriscale chat widget is opened or closed on the same page.
chat_message_sentVisitor sends a message in the chat widget.

© Periscale