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 this page when you need to call trackEvent() yourself from custom storefront code. If you are using standard Cevoid galleries or cards, do not start here. Those widget surfaces already emit the core Cevoid UGC events automatically. For payload-by-payload reference, use SDK API and Event Types.

When to use trackEvent()

Use trackEvent() when:
  • you render Cevoid interactions in your own storefront UI
  • you need to manually mirror Cevoid widget-style actions from custom code
  • you want those custom interactions to follow the supported Cevoid event names
Do not use trackEvent() just to forward standard gallery or card events into GA or GTM. In that case, use Forward Browser Events to GA.

1. Initialize the SDK

Initialize the SDK once before the first tracking call.
import { init } from '@cevoid/analytics-sdk'

init({
  publishableKey: 'cev_pk_...'
})
React example:
import { Analytics as CevoidAnalytics } from '@cevoid/analytics-sdk/react'

export function App() {
  return <CevoidAnalytics publishableKey="cev_pk_..." />
}
Verification:
  • trigger one manual call in the browser
  • confirm your handler runs without an initialization error
  • if browser events are enabled, confirm a matching cevoid:<event-name> CustomEvent fires on window

2. Send supported event names

Send the exact dotted Cevoid event name that matches the UI action.
import { trackEvent } from '@cevoid/analytics-sdk'

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

trackEvent('post.click', {
  widgetId: 'gallery-homepage',
  widgetType: 'gallery',
  postId: 'post_123',
  postPosition: 1
})
Common manual event groups:

3. Use real Cevoid IDs

Pass the real Cevoid identifiers from the rendered experience:
  • widgetId
  • postId
  • productId
  • marketId when relevant
Do not substitute labels, DOM IDs, or storefront-only identifiers unless they are the actual Cevoid IDs used by your integration.

4. Keep payload details in the reference pages

Use the reference pages for accepted values and field requirements:

Common mistakes

  • calling trackEvent() before init()
  • using manual tracking for standard Cevoid galleries or cards when the events are already emitted automatically
  • using the wrong event name for the actual UI surface
  • omitting required Cevoid IDs