Analytics SDK Reference

SDK Metrics Reference

All trackable events and methods available in the Veya Analytics SDK.

Showing 71 of 71 metrics
Event NameMethodCategoryDescription
session_startinit()Session

Automatically tracked when SDK initializes. Captures landing page and referrer.

session_endautomaticSession

Automatically tracked on page unload. Includes total session duration.

page_hiddenautomaticSession

Tracked when page visibility changes to hidden. Includes time spent on page.

page_visibleautomaticSession

Tracked when page becomes visible again after being hidden.

page_viewpageView(options)Navigation

Track page views with optional page type. Menu pages are tagged as funnel step 1.

Params: pageType?: string

scroll_depthautomaticNavigation

Automatically tracked at 25%, 50%, 75%, and 100% scroll milestones.

clickdata-veya-track attributeNavigation

Tracks clicks on elements with data-veya-track attribute. Use data-veya-props for custom properties.

product_viewproductView(product)E-commerce

Track when a user views a product detail page.

Params: id, name, category, price

product_clickproductClick(product)E-commerce

Track when a user clicks on a product (e.g., from a list).

Params: id, name, category, price

add_to_cartaddToCart(product, quantity)E-commerce

Track item added to cart. Updates internal cart state. Tagged as funnel step 2.

Params: id, name, category, price, quantity

remove_from_cartremoveFromCart(product, quantity)E-commerce

Track item removed from cart. Updates internal cart state.

Params: id, name, price, quantity

update_cart_quantityupdateCartQuantity(product, oldQty, newQty)E-commerce

Track quantity changes for cart items.

Params: id, name, oldQuantity, newQuantity

cart_viewviewCart()E-commerce

Track when user views their cart. Includes cart value and item count.

checkout_startcheckoutStart()E-commerce

Track checkout initiation. Tagged as funnel step 3 (checkout_info).

checkout_stepcheckoutStep(step)E-commerce

Track progression through checkout steps.

Params: step: string

add_payment_infoaddPaymentInfo(paymentMethod)E-commerce

Track payment method selection. Tagged as funnel step 4.

Params: paymentMethod: string

purchasecheckoutComplete(order)E-commerce

Track completed purchase. Tagged as funnel step 5 (confirmation). Clears cart.

Params: id, olo_order_id, total, subtotal, tax, tip, orderType, paymentMethod, items

quick_add_attemptedquickAddAttempted(options)E-commerce

Track when user taps quick add button before API call.

Params: productId, productName, source, modifierCount

quick_add_failedquickAddFailed(options)E-commerce

Track when quick add API call fails.

Params: productId, errorType, errorMessage, source

login_attemptloginAttempt(method)Authentication

Track login attempt with method (email, social, etc.).

Params: method: string

login_successloginSuccess(method, customerId)Authentication

Track successful login. Sets customer ID for future events.

Params: method: string, customerId: string

login_failureloginFailure(method, error)Authentication

Track failed login attempt with error message.

Params: method: string, error: string

logoutlogout()Authentication

Track user logout. Clears customer ID.

identifyidentify(customerId, traits)Authentication

Associate visitor with customer ID and optional traits.

Params: customerId: string, traits?: object

store_selectedsetStore(store)Store

Track initial store selection. Sets store context for all future events.

Params: id, name, orderType, address?

store_changedsetStore(store)Store

Track when user changes to a different store. Includes previous store info.

Params: id, name, orderType, address?

order_type_changedsetOrderType(orderType)Store

Track when user switches between pickup and delivery.

Params: orderType: 'pickup' | 'delivery'

location_modal_openedlocationModalOpened(options)Location

Track when location selection modal opens.

Params: trigger?, hasRecentLocations?

fulfillment_method_selectedfulfillmentMethodSelected(options)Location

Track when user selects fulfillment method (pickup/delivery).

Params: method, previousMethod?

location_permission_requestedlocationPermissionRequested()Location

Track when location permission is requested from browser.

location_permission_grantedlocationPermissionResponse(true)Location

Track when user grants location permission.

location_permission_deniedlocationPermissionResponse(false)Location

Track when user denies location permission.

location_search_startedlocationSearchStarted()Location

Track when user starts typing in location search.

location_search_resultslocationSearchResults(options)Location

Track location search results returned.

Params: query, resultCount, searchType?

location_selectedlocationSelected(options)Location

Track when user selects a location.

Params: locationId, locationName, fulfillmentMethod, resultPosition?, selectionSource?, distance?

location_view_toggledlocationViewToggled(view)Location

Track when user toggles between list and map view.

Params: view: 'list' | 'map'

recent_location_usedrecentLocationUsed(options)Location

Track when returning customer uses a recent location.

Params: locationId, locationName, position, lastOrderDate?

location_search_no_resultslocationSearchNoResults(options)Location

Track when location search returns no results.

Params: query, searchType?

location_search_errorlocationSearchError(options)Location

Track location search error.

Params: errorType, errorMessage?, query?

delivery_unavailabledeliveryUnavailable(options)Location

Track when delivery is unavailable for an address.

Params: address, reason?, nearestLocationId?, nearestDistance?

location_services_disabledlocationServicesDisabled()Location

Track when user has location services disabled.

delivery_address_entereddeliveryAddressEntered(options)Location

Track when user enters delivery address.

Params: addressType?, hasApartment?

delivery_address_validateddeliveryAddressValidated(options)Location

Track when delivery address is validated.

Params: success, validationType?, errorReason?

delivery_details_completeddeliveryDetailsCompleted(options)Location

Track when user completes delivery details form.

Params: hasApartment, hasInstructions, deliveryOption?

delivery_fallback_to_pickupdeliveryFallbackToPickup(options)Location

Track when user switches from delivery to pickup after delivery unavailable.

Params: reason, selectedLocationId?, selectedLocationName?

menu_loadedmenuLoaded(options)Menu

Track menu load performance and content metrics.

Params: loadTime, categoryCount, productCount, hasRecentItems, recentItemsCount

category_viewedcategoryViewed(category)Menu

Track when a category scrolls into viewport.

Params: id, name, position, viewDuration?

category_clickedcategoryClicked(category)Menu

Track when user taps category tab to navigate.

Params: id, name, position

menu_scrollmenuScroll(options)Menu

Track menu scroll depth milestones (25/50/75/100%).

Params: scrollDepth, categoryInView, scrollDirection, scrollVelocity

category_scrollcategoryScroll(options)Menu

Track horizontal scrolling of category tabs.

Params: scrollPosition, categoriesVisible, totalCategories, scrollDirection

product_impressionproductImpression(options)Menu

Track when product is visible in viewport for >2 seconds.

Params: productId, viewDuration, scrollPosition, categoryContext, hasQuickAdd

menu_session_summarymenuSessionSummary(options)Menu

Track overall menu browsing session when user leaves menu.

Params: sessionDuration, categoriesVisited, productsViewed, searchUsed, quickAddsAttempted, recentItemsEngaged

conveyance_interactionconveyanceInteraction(options)Menu

Track engagement with hero image conveyance.

Params: conveyanceType, scrollDepth, imageEngagement

recent_items_loadedrecentItemsLoaded(options)Menu

Track when recent items section is populated from order history.

Params: itemCount, oldestOrderDate, newestOrderDate

recent_items_emptyrecentItemsEmpty()Menu

Track when authenticated user has no order history.

recent_item_viewedrecentItemViewed(item)Menu

Track when a recent item appears in viewport.

Params: productId, lastOrderDate, hasQuickAdd

recent_item_clickedrecentItemClicked(item)Menu

Track when user taps on a recent item.

Params: productId, lastOrderDate, position, action

recent_items_scrollrecentItemsScroll(options)Menu

Track horizontal scroll of recent items carousel.

Params: itemsVisible, totalItems, scrollPosition

search_startedsearchStarted()Search

Track when user activates search mode.

searchsearch(query, resultCount)Search

Track search query and result count (legacy method).

Params: query: string, resultCount: number

search_clearedsearchCleared(options)Search

Track when user clears or cancels search.

Params: query, hadResults, searchDuration

search_no_resultssearchNoResults(options)Search

Track when search returns no results.

Params: query, queryLength

search_result_clickedsearchResultClicked(options)Search

Track when user clicks a product from search results.

Params: query, productId, resultPosition, categoryContext

promo_applypromoApply(promo)Loyalty & Promos

Track promo code application attempt.

Params: code, success, discount, error

promo_removepromoRemove(code)Loyalty & Promos

Track promo code removal.

Params: code: string

reward_viewrewardView(reward)Loyalty & Promos

Track when user views available rewards.

Params: reward: object

reward_applyrewardApply(reward)Loyalty & Promos

Track when user applies a reward.

Params: reward: object

reward_removerewardRemove(reward)Loyalty & Promos

Track when user removes an applied reward.

Params: reward: object

errorerror(type, message, properties)Error

Track application errors with type and message.

Params: type: string, message: string, properties?: object

experiment_assignedsetExperiment(name, variant)Experiments

Track A/B test or experiment assignment.

Params: experimentName: string, variant: string

customtrack(eventName, properties)Navigation

Track any custom event with arbitrary properties.

Params: eventName: string, properties?: object