Skip to main content

Event

An impression, click or sale, reported so GoWit can attribute sales to ads.

Fields​

FieldTypeRequiredDescription
domain_idintegerYesYour 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_typestringYesWhat 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_idstringWhen online eventsThe same session_id sent in the ad request. Required for every event except a sale whose lines are all OFFLINE.
ad_idtokenWhen impression, clickThe ad_id from the ad response, unchanged. Required for clicks; for impressions send ad_id or ad_ids. Not read on sales.
ad_idsstring[]NoImpressions only: several ads seen at once, no duplicates. Do not send together with ad_id.
product_idstringNoClicks: the product clicked, when a display ad promotes several products. Custom kinds: the product the event is about (its catalog id).
seller_refstringNoCustom kinds: the seller id of the product the event is about.
quantityintegerNoCustom kinds: units, e.g. how many were added to the cart.
sale_amountnumberNoCustom kinds: the value of the event, e.g. the cart line value.
custom_valuesobjectNoCustom kinds: your own numeric measures, as {"name": number}. Names up to 64 bytes.
line_idstringNoCustom 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_idstringNoYour pseudonymous shopper id. Lets a sale be attributed across sessions. Never an e-mail or phone number.
salesobject[]When saleThe order lines. One sale event is one whole order.
sales[].seller_refstringYesThe seller id of the product, as pushed in the seller catalog.
sales[].product_idstringYesThe product id from the catalog push. Never its sku.
sales[].quantityintegerYesUnits bought on this line.
sales[].unit_pricenumberYesPrice of one unit.
sales[].channelstringNoWhere 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_idstringNoYour order line id. Keeps lines apart when one product appears twice.
sales[].brandstringNoBrand of the product, kept on the event.
sales[].retailer_taxonomystringNoCategory path of the product, kept on the event.
order_idstringNoYour order id. Recommended: it keeps one order from counting twice when you retry.
currencystringNoCurrency of the order, e.g. EUR.
sale_datedatetimeWhen offline salesWhen the order was placed. Required when any line is OFFLINE. A time without a zone is read as UTC.
location_idstringWhen offline salesStore 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_botbooleanNoSend 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
}