Skip to content
Browse documentation

API reference

Storefront events

Record lightweight storefront analytics events — page and resource views, searches and clicks — for the project's insights dashboards.

Feature requirement: the project must have the analytics feature enabled, or these endpoints return 404.

POST/api/v1/storefront/projects/{project_slug}/events

Record Storefront Event

Parameters
NameTypeInDescription
project_slugstringpathRequired.
Request body · CatalogEventCreate
FieldTypeDescription
target_typeCatalogEventTargetTyperequiredStorefront catalog engagement target kinds.
target_idstringrequired—
source_urlstring (nullable)optional—
metadataobjectoptional—
Example request
curl -X POST "https://api.webtools.ng/api/v1/storefront/projects/your-project/events" \
  -H "X-Project-Key: wt_pk_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "target_type": "…", "target_id": "…" }'

← All resource groups