DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsAnalytics & TrackingFirst-Party Analytics (Insights)
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Storefront ViewsGoogle Analytics (GA4)PostHogUTM TrackingConversion FunnelThoughtMetricFirst-Party Analytics (Insights)
Locations
Tax
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

First-Party Analytics (Insights)

Self-hosted, cookie-light analytics built into the SDK.

Updated July 10, 2026

On this page
  • dash.insights
  • Initialize
  • Track
  • Attribution helpers

dash.insights

Insights is DashForDevs' own first-party analytics — a lightweight collector in the SDK that feeds visitor, pageview, event and conversion data straight to your dashboard (no GA4 required). It also powers accurate order attribution because the visitor id is carried into server-side checkout.

Initialize

typescript
dash.insights.init({ autoPageviews: true, autoClicks: true })

Track

typescript
dash.insights.pageview("/products/blue-dream")
dash.insights.track("add_to_cart", { sku, price })
dash.insights.identify(customerId, { email })
dash.insights.conversion(orderTotal, { orderId })
dash.insights.notifyRouteChange(pathname)   // SPA route changes

Attribution helpers

typescript
dash.insights.getVisitorId()
dash.insights.getSessionId()
dash.insights.getAttribution()          // first-touch / last-touch
dash.insights.attributionForOrder()     // attach to a checkout payload

Events are batched and flushed to POST /api/storefront/analytics/collect via navigator.sendBeacon (falling back to fetch). Bots are classified out server-side so dashboard metrics reflect real users. See Dashboard → Marketing → Native Analytics and the conversion funnel.

PreviousThoughtMetricNextList Locations

On this page

  • dash.insights
  • Initialize
  • Track
  • Attribution helpers