Skip to main content
The Analytics Collection endpoints allow your custom storefront to send pageview, custom event, and interaction data to RMZ for store analytics. These endpoints run on a separate rate limit from the main Storefront API to ensure analytics traffic never blocks store requests.
These endpoints are used internally by the RMZ analytics script (rmz-analytics.js) and the Storefront SDK. You can also call them directly from a custom storefront implementation.

Authentication

No Bearer token or secret key is required. The store is identified from the request domain/origin (same as other Storefront API endpoints).

Rate Limits

Analytics endpoints have their own per-IP rate limiting (separate from the main API): Batch requests count each event in the batch against the rate limit.

POST /storefront/analytics/collect

Submit a single analytics event.

Headers

Body Parameters

Example Request

Response

Success (202)

Error Responses

The response uses a 202 Accepted status code rather than 200 OK, indicating the event has been accepted for processing. The response format uses status instead of the standard success/data wrapper used by other Storefront API endpoints.

POST /storefront/analytics/collect/batch

Submit multiple analytics events in a single request. Reduces HTTP overhead for high-traffic storefronts.

Headers

Body Parameters

Example Request

Response

Success (202)

The processed field indicates how many events from the batch were successfully processed.

Error Responses

Batches are capped at 30 events. Any events beyond the 30th are silently dropped. If your storefront generates more than 30 events between flushes, send multiple batch requests.

Supported Event Types

The event types web_vital, js_error, time_on_page, and scroll_depth are silently skipped by the server and will not be recorded.