Nexus Integrations / API / Analytics
Track Analytics Event
Record a storefront view, product view or checkout start.
1. Endpoint
POST
https://api.gpirblx.com/api/v1/stores/{Store-Id}/analytics/eventsAccepts STORE_VIEW, PRODUCT_VIEW or CHECKOUT_STARTED events. PURCHASE_COMPLETED must be recorded by the server.
2. Parameters
| Name | Location | Required | Description |
|---|---|---|---|
storeId | Path | Yes | The Nexus store ID. |
event | Body | Yes | STORE_VIEW, PRODUCT_VIEW or CHECKOUT_STARTED. |
productId | Body | No | The product ID for a product event. |
sessionId | Body | No | A session identifier, at least 8 characters. |
source | Body | No | A short source label. Defaults to WEB. |
metadata | Body | No | Additional 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"
}
}