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 guide when you want to start sending widget interaction events from your storefront. This covers the setup flow and where to place event calls. For the full payload reference, use Tracking Events.

Before you start

Make sure you have:
  • Installed the SDK from Installation
  • A valid Cevoid publishableKey
  • Access to the widget IDs and post or product IDs you want to track

1. Initialize the SDK

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

init({
  publishableKey: 'cev_pk_...'
})
If you use React, import Analytics as CevoidAnalytics and render <CevoidAnalytics /> once near the top of your app instead of calling init() manually.

2. Track widget lifecycle events

Track when a widget loads and when it becomes visible. This gives you a baseline for impressions and engagement rates.
import { trackEvent } from '@cevoid/analytics-sdk'

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

trackEvent('widget.view', {
  widgetId: 'gallery-homepage',
  widgetType: 'gallery',
  postsLoadedCount: 12
})
Use:
  • widget.load when Cevoid has loaded content into the widget
  • widget.view when the widget enters the shopper’s viewport

3. Track post interactions

Track the post-level actions that matter in your storefront experience.
trackEvent('post.view', {
  widgetId: 'gallery-homepage',
  widgetType: 'gallery',
  postId: 'post_123',
  postPosition: 1
})

trackEvent('post.click', {
  widgetId: 'gallery-homepage',
  widgetType: 'gallery',
  postId: 'post_123',
  postPosition: 1
})
You can also use:
  • post.view.popup
  • post.clap
Use the same base post payload and include taggedProductIds when that data is available.

4. Track product clicks

When a shopper clicks through to a product from Cevoid content, send a product click event.
trackEvent('product.click.tag', {
  widgetId: 'gallery-homepage',
  widgetType: 'gallery',
  postId: 'post_123',
  productId: 'prod_456'
})
Depending on where the click originates, you can also use:
  • product.click.post
  • product.click.card
Choose the event name that matches the UI surface where the click happened.
If your gallery supports pagination or upload CTAs, track those interactions too.
trackEvent('gallery.load_more', {
  widgetId: 'gallery-homepage',
  widgetType: 'gallery',
  loadMoreType: 'button'
})

trackEvent('gallery.upload_cta_click', {
  widgetId: 'gallery-homepage',
  widgetType: 'gallery'
})
Accepted loadMoreType values:
  • button
  • infinity_loader

  • Initialize the SDK once
  • Trigger event calls where the actual shopper interaction happens
  • Pass the real Cevoid IDs from the rendered widget data, not derived labels
  • Keep event names stable and use the exact dotted names expected by the SDK

Common mistakes

  • Calling trackEvent() before init()
  • Using the wrong event name for the UI surface
  • Omitting required IDs such as widgetId, postId, or productId