Skip to the content.

Shopping Tracker API reference

Create events

This endpoint receives a list of events and registers them as tracking data.

Endpoint: POST https://cubki.jp/trackers/events/shopping/assistants/ASSISTANT_ID.json

Path parameters

Assistant ID

Identifier of your #CBK Assistant

More details: Assistant ID

Content Type

application/json

Payload

Tracking ID

A unique identifier, that identifies a specific user globally.

We recommend using a prefix like a company name to avoid conflict.

Sending events without trackingId is allowed. But, since this is used to make a session to track users’ behavior, it is strongly recommended to send this value. Event data without trackingId may not be used when analyzing.

Namespace

Name for separating tracking data.

More details: Namespace

List of events

Actual tracking events.

More details: How to make an event object

Example request with curl

Prepare a variable and a payload.

$ ASSISTANT_ID=<Your #CBK assistant ID>
$ cat <<PAYLOAD > events.json
{
  "events": [
    {
      "productId": "product-1",
      "type": "impression"
    },
    {
      "productId": "product-2",
      "type": "impression"
    }
  ],
  "namespace": "website1-tracking",
  "trackingId": "mycompany/ef5553d9-f5a2-42cb-99dd-26d769f00657"
}
PAYLOAD

Send the payload to the endpoint

$ curl -X POST -H "Content-Type: application/json" https://cubki.jp/trackers/events/shopping/assistants/${ASSISTANT_ID}.json --data @events.json
{}

Responses