NexusAPI IntegrationTrack Analytics Event

Nexus Integrations / API / Analytics

Track Analytics Event

Record a storefront view, product view or checkout start.

1. Endpoint

POSThttps://api.gpirblx.com/api/v1/stores/{Store-Id}/analytics/events

Accepts STORE_VIEW, PRODUCT_VIEW or CHECKOUT_STARTED events. PURCHASE_COMPLETED must be recorded by the server.

AuthenticationPublic
AccessNo API key required

2. Parameters

NameLocationRequiredDescription
storeIdPathYesThe Nexus store ID.
eventBodyYesSTORE_VIEW, PRODUCT_VIEW or CHECKOUT_STARTED.
productIdBodyNoThe product ID for a product event.
sessionIdBodyNoA session identifier, at least 8 characters.
sourceBodyNoA short source label. Defaults to WEB.
metadataBodyNoAdditional JSON metadata.

3. Request

When sending JSON, include the following request body:

{
  "event": "PRODUCT_VIEW",
  "productId": "PRODUCT_ID",
  "sessionId": "visitor-session-123",
  "source": "WEB",
  "metadata": {}
}

Example request:

curl -X POST "https://api.gpirblx.com/api/v1/stores/STORE_ID/analytics/events" \
  -H "Content-Type: application/json" \
  -d '{"event":"PRODUCT_VIEW","productId":"PRODUCT_ID","sessionId":"visitor-session-123"}'

4. Response

Successful response:

{
  "success": true,
  "data": {
    "accepted": true,
    "eventId": "event_id"
  }
}