This page explains the runtime behavior behind the Cevoid Analytics SDK so you can choose the right setup for your storefront.Documentation Index
Fetch the complete documentation index at: https://docs.cevoid.com/llms.txt
Use this file to discover all available pages before exploring further.
Event flow
- You initialize the SDK with
init()or<CevoidAnalytics />. - A tracking call validates the event name and builds event context.
- The SDK emits a browser
CustomEventunless browser events are disabled. - The event is queued until consent is resolved when session tracking is enabled.
- The transport flushes events to the telemetry service.
Consent and session tracking
Session tracking is off by default. When you setenableSessionTracking: true, the SDK resolves consent before attaching a Cevoid session ID to events.
The SDK checks these consent sources:
- Shopify Customer Privacy API
dataLayerconsent entries foranalytics_storagewindow.cevoidTrackingConsent
cevoid_sid cookie when all available checks pass. If cookies cannot be written, the SDK falls back to an in-memory session ID for the current page runtime.
Session behavior
- Cookie name:
cevoid_sid - Expiration: 30-minute rolling expiry
- Legacy cleanup: deletes the older
ca_sessioncookie on initialization - Cookie scope: uses
cookieDomainwhen you provide one
If you do not enable session tracking, the SDK still sends events. Those events simply do not include a Cevoid session ID.
Browser events
By default, the SDK emits a browser event for every tracked action. The event name is prefixed withcevoid:.
Examples:
cevoid:post.clickcevoid:sale.complete
emitBrowserEvents: false.
Context enrichment
Every queued event is enriched with runtime context before it is sent:| Field | Source |
|---|---|
device | window.innerWidth mapped to mobile, tablet, or desktop |
language | navigator.language |
page_url | window.location.href |
referer | document.referrer, or the current page URL when no referrer exists |
identify(), the SDK also adds the current identity payload to later events.
Batching and delivery
The transport keeps an in-memory queue and sends events toPOST /events on your configured telemetry host.
Queue behavior
- Maximum queue size:
100events - Flush batch size:
20events - Flush interval: every
2seconds - Extra flush trigger: when the document becomes hidden
Delivery behavior
- Uses
navigator.sendBeacon()when available - Falls back to
fetch(..., { keepalive: true }) - Does not retry failed requests
https://telemetry.cevoid.com, which you can override with apiHost.
Legacy migration notes
The current widget event names use dotted names such aspost.click and gallery.load_more.
When moving from older gallery analytics implementations:
- Use
publishableKeyfor SDK initialization - Use the current dotted event names and payload keys from the SDK types