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 package exports or window.cevoid methods to send browser-side events to Cevoid. Event names and payload keys are case-sensitive.
trackEvent(name, data)
Use trackEvent() for Cevoid on-site UGC widget events.
import { trackEvent } from '@cevoid/analytics-sdk'
trackEvent('post.click', {
widgetId: 'gallery-homepage',
widgetType: 'gallery',
postId: 'post_123',
postPosition: 4,
taggedProductIds: ['prod_1', 'prod_2']
})
widget.load
widget.view
post.view
post.click
post.view.popup
post.clap
product.click.tag
product.click.post
product.click.card
gallery.load_more
gallery.upload_cta_click
Use trackSale() for purchase events. The public SDK path for conversions is trackSale(data), not trackEvent('sale.complete', ...).
| Field | Type | Notes |
|---|
widgetId | string | Required for widget-driven events. |
widgetType | 'gallery' | 'card' | Required for widget-driven events. |
marketId | string | Optional market identifier. |
pagePositionX | number | Optional horizontal page position. |
pagePositionY | number | Optional vertical page position. |
trackEvent() only sends recognized UGC event names. Unknown names are ignored.
Event reference
Use when a widget finishes loading its initial content.
| Field | Type | Required | Accepted values / notes |
|---|
widgetId | string | Yes | Your Cevoid widget instance ID. |
widgetType | 'gallery' | 'card' | Yes | The rendered widget type. |
marketId | string | No | Market identifier for localized storefronts. |
postsLoadedCount | number | No | Number of posts loaded into the widget. |
fallbackPostsCount | number | No | Number of fallback posts used. |
pagePositionX | number | No | Horizontal page position. |
pagePositionY | number | No | Vertical page position. |
Use when the widget becomes visible to the shopper.
| Field | Type | Required | Accepted values / notes |
|---|
widgetId | string | Yes | Your Cevoid widget instance ID. |
widgetType | 'gallery' | 'card' | Yes | The rendered widget type. |
marketId | string | No | Market identifier for localized storefronts. |
postsLoadedCount | number | No | Number of posts loaded into the widget. |
fallbackPostsCount | number | No | Number of fallback posts used. |
pagePositionX | number | No | Horizontal page position. |
pagePositionY | number | No | Vertical page position. |
Use these events for post impressions and post-level interactions.
| Field | Type | Required | Accepted values / notes |
|---|
widgetId | string | Yes | Widget instance ID that showed the post. |
widgetType | 'gallery' | 'card' | Yes | The rendered widget type. |
postId | string | Yes | Cevoid post ID. |
marketId | string | No | Market identifier for localized storefronts. |
postPosition | number | No | Position of the post in the widget. |
taggedProductIds | string[] | No | Product IDs associated with the post. |
product.click.tag, product.click.post, product.click.card
Use these events when a shopper clicks through to a product from Cevoid content.
| Field | Type | Required | Accepted values / notes |
|---|
widgetId | string | Yes | Widget instance ID that showed the product. |
widgetType | 'gallery' | 'card' | Yes | The rendered widget type. |
postId | string | Yes | Cevoid post ID tied to the product click. |
productId | string | Yes | Product ID that was clicked. |
marketId | string | No | Market identifier for localized storefronts. |
gallery.load_more
Use when a shopper loads more posts in a gallery widget.
| Field | Type | Required | Accepted values / notes |
|---|
widgetId | string | Yes | Gallery widget instance ID. |
widgetType | 'gallery' | 'card' | Yes | Use the actual widget type, typically gallery. |
marketId | string | No | Market identifier for localized storefronts. |
loadMoreType | 'infinity_loader' | 'button' | Yes | How additional posts were loaded. |
pagePositionX | number | No | Horizontal page position. |
pagePositionY | number | No | Vertical page position. |
gallery.upload_cta_click
Use when a shopper clicks the upload CTA inside a gallery.
| Field | Type | Required | Accepted values / notes |
|---|
widgetId | string | Yes | Gallery widget instance ID. |
widgetType | 'gallery' | 'card' | Yes | Use the actual widget type, typically gallery. |
marketId | string | No | Market identifier for localized storefronts. |
pagePositionX | number | No | Horizontal page position. |
pagePositionY | number | No | Vertical page position. |
trackSale(data)
Use trackSale() for conversion events. The SDK emits the browser event cevoid:sale.complete and sends the internal event sale.complete.
import { trackSale } from '@cevoid/analytics-sdk'
trackSale({
orderId: 'order_123',
marketId: 'market_123',
customerId: 'cust_456',
currency: 'USD',
revenue: 129.99,
skus: ['SKU-1', 'SKU-2']
})
Sale payload fields
| Field | Type | Notes |
|---|
marketId | string | Optional market identifier used for SKU resolution in telemetry. |
orderId | string | Required order identifier. |
customerId | string | Optional customer identifier. |
currency | string | Required ISO currency code. |
revenue | number | Required decimal major-unit amount in currency. |
skus | string[] | Optional purchased SKUs used for telemetry-side product resolution. |
Provide revenue in the same currency as currency as a decimal major-unit amount, such as 129.99 USD.
identify(data)
Use identify() to enrich future events with profile-level context.
import { identify } from '@cevoid/analytics-sdk'
identify({
profileId: 'profile_123',
externalId: 'shopify_customer_456'
})
This data is kept in SDK memory and attached to future tracked events. Call identify() again to replace the current identity data.
Identity fields
| Field | Type | Required | Accepted values / notes |
|---|
profileId | string | No | Cevoid profile ID. |
externalId | string | No | External customer identifier from your commerce platform or app. |
reset()
Use reset() from the package entry point when you need to clear SDK state, such as on logout or a hard storefront context change.
import { reset } from '@cevoid/analytics-sdk'
reset()
reset() clears the current initialization state, consent state, queued deferred events, and in-memory identity data, then flushes any currently queued transport batch.