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 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 event names

  • 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', ...).

Shared widget fields

FieldTypeNotes
widgetIdstringRequired for widget-driven events.
widgetType'gallery' | 'card'Required for widget-driven events.
marketIdstringOptional market identifier.
pagePositionXnumberOptional horizontal page position.
pagePositionYnumberOptional vertical page position.
trackEvent() only sends recognized UGC event names. Unknown names are ignored.

Event reference

widget.load

Use when a widget finishes loading its initial content.
FieldTypeRequiredAccepted values / notes
widgetIdstringYesYour Cevoid widget instance ID.
widgetType'gallery' | 'card'YesThe rendered widget type.
marketIdstringNoMarket identifier for localized storefronts.
postsLoadedCountnumberNoNumber of posts loaded into the widget.
fallbackPostsCountnumberNoNumber of fallback posts used.
pagePositionXnumberNoHorizontal page position.
pagePositionYnumberNoVertical page position.

widget.view

Use when the widget becomes visible to the shopper.
FieldTypeRequiredAccepted values / notes
widgetIdstringYesYour Cevoid widget instance ID.
widgetType'gallery' | 'card'YesThe rendered widget type.
marketIdstringNoMarket identifier for localized storefronts.
postsLoadedCountnumberNoNumber of posts loaded into the widget.
fallbackPostsCountnumberNoNumber of fallback posts used.
pagePositionXnumberNoHorizontal page position.
pagePositionYnumberNoVertical page position.

post.view, post.click, post.view.popup, post.clap

Use these events for post impressions and post-level interactions.
FieldTypeRequiredAccepted values / notes
widgetIdstringYesWidget instance ID that showed the post.
widgetType'gallery' | 'card'YesThe rendered widget type.
postIdstringYesCevoid post ID.
marketIdstringNoMarket identifier for localized storefronts.
postPositionnumberNoPosition of the post in the widget.
taggedProductIdsstring[]NoProduct 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.
FieldTypeRequiredAccepted values / notes
widgetIdstringYesWidget instance ID that showed the product.
widgetType'gallery' | 'card'YesThe rendered widget type.
postIdstringYesCevoid post ID tied to the product click.
productIdstringYesProduct ID that was clicked.
marketIdstringNoMarket identifier for localized storefronts.
Use when a shopper loads more posts in a gallery widget.
FieldTypeRequiredAccepted values / notes
widgetIdstringYesGallery widget instance ID.
widgetType'gallery' | 'card'YesUse the actual widget type, typically gallery.
marketIdstringNoMarket identifier for localized storefronts.
loadMoreType'infinity_loader' | 'button'YesHow additional posts were loaded.
pagePositionXnumberNoHorizontal page position.
pagePositionYnumberNoVertical page position.
Use when a shopper clicks the upload CTA inside a gallery.
FieldTypeRequiredAccepted values / notes
widgetIdstringYesGallery widget instance ID.
widgetType'gallery' | 'card'YesUse the actual widget type, typically gallery.
marketIdstringNoMarket identifier for localized storefronts.
pagePositionXnumberNoHorizontal page position.
pagePositionYnumberNoVertical 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

FieldTypeNotes
marketIdstringOptional market identifier used for SKU resolution in telemetry.
orderIdstringRequired order identifier.
customerIdstringOptional customer identifier.
currencystringRequired ISO currency code.
revenuenumberRequired decimal major-unit amount in currency.
skusstring[]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

FieldTypeRequiredAccepted values / notes
profileIdstringNoCevoid profile ID.
externalIdstringNoExternal 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.