Event
An impression, click or sale, reported so GoWit can attribute sales to ads.
- Sent to:
POST /server/events
Fields
| Field | Type | Required | Description |
|---|---|---|---|
domain_id | integer | Yes | Your domain id: the number of your market on GoWit. GoWit shares it with your host and keys. Stage and production use their own values. |
event_type | string | Yes | What happened. Besides the four built-in kinds, any custom kind your market registered is accepted, e.g. add_to_cart. An unregistered name is refused. See custom events. One of impression, viewable_impression, click, sale, <custom kind>. |
session_id | string | When online events | The same session_id sent in the ad request. Required for every event except a sale whose lines are all OFFLINE. |
ad_id | token | When impression, click | The ad_id from the ad response, unchanged. Required for clicks; for impressions send ad_id or ad_ids. Not read on sales. |
ad_ids | string[] | No | Impressions only: several ads seen at once, no duplicates. Do not send together with ad_id. |
product_id | string | No | Clicks: the product clicked, when a display ad promotes several products. Custom kinds: the product the event is about (its catalog id). |
seller_ref | string | No | Custom kinds: the seller id of the product the event is about. |
quantity | integer | No | Custom kinds: units, e.g. how many were added to the cart. |
sale_amount | number | No | Custom kinds: the value of the event, e.g. the cart line value. |
custom_values | object | No | Custom kinds: your own numeric measures, as {"name": number}. Names up to 64 bytes. |
line_id | string | No | Custom kinds: your id for this event. Resend the same id only when resending the same event; two events of one product need two ids. |
customer_id | string | No | Your pseudonymous shopper id. Lets a sale be attributed across sessions. Never an e-mail or phone number. |
sales | object[] | When sale | The order lines. One sale event is one whole order. |
sales[].seller_ref | string | Yes | The seller id of the product, as pushed in the seller catalog. |
sales[].product_id | string | Yes | The product id from the catalog push. Never its sku. |
sales[].quantity | integer | Yes | Units bought on this line. |
sales[].unit_price | number | Yes | Price of one unit. |
sales[].channel | string | No | Where the line was sold. Offline (in-store) lines need sale_date and location_id on the event. One of ONLINE, OFFLINE. Default ONLINE. |
sales[].line_id | string | No | Your order line id. Keeps lines apart when one product appears twice. |
sales[].brand | string | No | Brand of the product, kept on the event. |
sales[].retailer_taxonomy | string | No | Category path of the product, kept on the event. |
order_id | string | No | Your order id. Recommended: it keeps one order from counting twice when you retry. |
currency | string | No | Currency of the order, e.g. EUR. |
sale_date | datetime | When offline sales | When the order was placed. Required when any line is OFFLINE. A time without a zone is read as UTC. |
location_id | string | When offline sales | Store code of an offline sale. A code your market does not know means the order is not counted (LOCATION_NOT_FOUND in the event log). |
is_bot | boolean | No | Send true when your bot detection flags the visit. Impressions and clicks are then counted as invalid traffic. |
Shape
{
"domain_id": 1001,
"event_type": "impression",
"session_id": "ec07083a-8bf812",
"ad_id": "<ad_id>",
"ad_ids": [],
"product_id": "<product_id>",
"seller_ref": "<seller_ref>",
"quantity": 0,
"sale_amount": 0,
"custom_values": "<custom_values>",
"line_id": "<line_id>",
"customer_id": "<customer_id>",
"sales": [
{
"seller_ref": "ADV003",
"product_id": "P30007",
"quantity": 1,
"unit_price": 100.78,
"channel": "ONLINE",
"line_id": "<line_id>",
"brand": "<brand>",
"retailer_taxonomy": "<retailer_taxonomy>"
}
],
"order_id": "ORDER-1001",
"currency": "<currency>",
"sale_date": "2026-11-20T14:05:00Z",
"location_id": "<location_id>",
"is_bot": true
}