Skip to main content

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.

Use the installation path that matches your storefront stack. All paths use the same configuration shape and send events to Cevoid’s telemetry service.

Configuration

Call init() once before sending events. The React component uses the same props.
OptionTypeDefaultDescription
publishableKeystringRequired workspace publishable key.
enableSessionTrackingbooleanfalseEnables Cevoid session tracking after consent checks pass.
cookieDomainstringSets the domain on the cevoid_sid session cookie.
emitBrowserEventsbooleantrueEmits CustomEvents such as cevoid:post.click on window.
apiHoststringhttps://telemetry.cevoid.comOverrides the telemetry host for development or controlled environments.
The SDK ignores repeated init() calls after the first successful initialization.

Script tag

Use the script tag when you want the fastest setup and do not need package imports.
<script
  type="module"
  src="https://cdn.cevoid.com/analytics/v1/script.js"
  data-publishable-key="cev_pk_..."
  data-enable-session-tracking="true"
  data-cookie-domain=".example.com"
></script>
The script reads these data-* attributes:
  • data-publishable-key
  • data-enable-session-tracking
  • data-cookie-domain
  • data-api-host
  • data-emit-browser-events
After loading, the script auto-initializes and exposes:
  • window.cevoid.init
  • window.cevoid.reset
  • window.cevoid.identify
  • window.cevoid.trackEvent
  • window.cevoid.trackSale

npm package

Use the package entry point when you want full control over initialization and access to reset().
npm install @cevoid/analytics-sdk
import { init, trackEvent } from '@cevoid/analytics-sdk'

init({
  publishableKey: 'cev_pk_...',
  enableSessionTracking: true,
  cookieDomain: '.example.com'
})

trackEvent('widget.load', {
  widgetId: 'gallery-homepage',
  widgetType: 'gallery',
  postsLoadedCount: 12
})

React

Use the React entry point when your storefront already renders through React.
npm install @cevoid/analytics-sdk
import { Analytics as CevoidAnalytics, trackEvent } from '@cevoid/analytics-sdk/react'

export function App() {
  return (
    <>
      <CevoidAnalytics
        publishableKey="cev_pk_..."
        enableSessionTracking={true}
      />
      <button
        onClick={() =>
          trackEvent('gallery.upload_cta_click', {
            widgetId: 'gallery-homepage',
            widgetType: 'gallery'
          })
        }
      >
        Upload
      </button>
    </>
  )
}
The React package exports:
  • Analytics
  • trackEvent
  • trackSale
  • identify
In React examples, you can alias Analytics to CevoidAnalytics for clearer component naming.

Initialization checklist

  • Use publishableKey for initialization.
  • Initialize the SDK before your first tracking call.
  • Turn on enableSessionTracking only if you want Cevoid-managed session IDs.
  • Leave emitBrowserEvents enabled if you want to consume SDK events in GTM or another browser-side layer.