Skip to main content
POST
/
public
/
tracking
/
events
curl -X POST "https://your-store.myshopify.com/apps/proxy_genlook-x/public/tracking/events" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [
      {
        "event": "widget:button_click",
        "properties": { "product_id": "gid://shopify/Product/456" },
        "timestamp": "2024-01-15T10:30:00Z",
        "$insert_id": "event_123"
      }
    ],
    "context": {
      "$current_url": "https://yourstore.com/products/tshirt",
      "$host": "yourstore.com",
      "$session_id": "session_abc123",
      "genlook_client_id": "550e8400-e29b-41d4-a716-446655440000",
      "genlook_product_id": "gid://shopify/Product/456"
    }
  }'
{
  "success": true
}
Send batched analytics events to track widget usage and conversion funnels. Max 50 events per batch. Tracking failures never block user flow.

Request

events
array
required
Array of event objects. Each contains:
  • event (string, required) — Event name (e.g. widget:button_click)
  • properties (object, optional) — Custom properties
  • timestamp (string, required) — ISO 8601 timestamp
  • $insert_id (string, required) — Unique ID for deduplication
context
object
required
Shared context for all events in the batch: page URL, viewport size, user agent, session/pageview IDs, and Genlook-specific fields (genlook_client_id, genlook_product_id, genlook_variant_id, genlook_lib_version).
curl -X POST "https://your-store.myshopify.com/apps/proxy_genlook-x/public/tracking/events" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [
      {
        "event": "widget:button_click",
        "properties": { "product_id": "gid://shopify/Product/456" },
        "timestamp": "2024-01-15T10:30:00Z",
        "$insert_id": "event_123"
      }
    ],
    "context": {
      "$current_url": "https://yourstore.com/products/tshirt",
      "$host": "yourstore.com",
      "$session_id": "session_abc123",
      "genlook_client_id": "550e8400-e29b-41d4-a716-446655440000",
      "genlook_product_id": "gid://shopify/Product/456"
    }
  }'

Event Types

EventDescription
widget:button_clickWidget button clicked
widget:image_uploadUser uploaded an image
widget:generation_startGeneration started
widget:result_viewResult displayed
widget:share_clickedShare button clicked
widget:download_clickedDownload button clicked
widget:add_to_cart_clickedAdd to cart from widget
widget:add_to_cart_successAdd to cart succeeded
widget:email_collectedEmail collected
product_page:page_viewProduct page viewed
product_page:cart_addCart add from product page
Event names follow category:action format with snake_case.

Response

success
boolean
required
Whether the batch was processed.
{
  "success": true
}