Browser ingest
Receive website events from the VYG web pixel.
POST https://cdp.vyg.app/cdp/ingestThe VYG Shopify pixel and web pixel send website events here automatically. No API key is needed.
Setup
Use a storefront origin registered with your VYG integration. Send Content-Type: application/json
and the storefront's Origin header. Payload scope values must match the connected store domain.
An unregistered origin or mismatched scope returns 403.
No bearer token is required. For server integrations, use Server-side events.
Request
curl -s -X POST https://cdp.vyg.app/cdp/ingest \
-H "Content-Type: application/json" \
-H "Origin: https://your-shop.myshopify.com" \
-d '{
"source": { "scope": "your-shop.myshopify.com" },
"events": [
{
"scope": "your-shop.myshopify.com",
"eventType": "page_viewed",
"properties": {}
}
]
}'The body is a JSON object with a source and an events array. Each event has an eventType from the
event types, the store scope, and optional properties.
Limits
- The body may be at most 64 KB. A larger body gets
413. - The body must be a JSON object. Anything else gets
400. - Requests above the rate limit return
429.
Response
An accepted request returns 202. Events may take time to appear in VYG:
{ "status": "accepted" }Treat any 2xx status as success.
CORS
CORS requests are supported for registered storefront origins.
Errors
Errors may contain {"error": {"code", "message"}} or {"message": "..."}.
Check the HTTP status first, then read the available error fields.
| Status | code | When |
|---|---|---|
400 | bad_request | The body is not JSON, or not a JSON object. |
403 | insufficient_scope | The origin is not allowed, or a payload scope does not match it. |
404 | none | A method other than POST or OPTIONS: Not Found. |
413 | bad_request | The body is over 64 KB. |
503 | unavailable | Events could not be accepted. Retry. |
See Collect errors for details.