curl --request POST \
--url https://api.topsort.com/v2/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"impressions": [
{
"occurredAt": "2023-11-07T05:31:56Z",
"opaqueUserId": "<string>",
"id": "<string>",
"resolvedBidId": "<string>",
"entity": {
"id": "<string>",
"type": "product"
},
"placement": {
"path": "<string>",
"position": 2,
"page": 2,
"pageSize": 2,
"productId": "<string>",
"categoryIds": [
"<string>"
],
"searchQuery": "<string>"
},
"additionalAttribution": {
"id": "<string>",
"type": "product"
},
"page": {
"type": "home",
"pageId": "<string>",
"value": "electronics"
},
"object": {
"type": "listing",
"assetId": "<string>",
"clickType": "product"
},
"externalCampaignId": "<string>",
"externalVendorId": "<string>",
"deviceType": "desktop",
"channel": "onsite"
}
],
"clicks": [
{
"occurredAt": "2023-11-07T05:31:56Z",
"opaqueUserId": "<string>",
"id": "<string>",
"resolvedBidId": "<string>",
"entity": {
"id": "<string>",
"type": "product"
},
"placement": {
"path": "<string>",
"position": 2,
"page": 2,
"pageSize": 2,
"productId": "<string>",
"categoryIds": [
"<string>"
],
"searchQuery": "<string>"
},
"additionalAttribution": {
"id": "<string>",
"type": "product"
},
"page": {
"type": "home",
"pageId": "<string>",
"value": "electronics"
},
"object": {
"type": "listing",
"assetId": "<string>",
"clickType": "product"
},
"clickType": "product",
"externalCampaignId": "<string>",
"externalVendorId": "<string>",
"deviceType": "desktop",
"channel": "onsite"
}
],
"purchases": [
{
"occurredAt": "2023-11-07T05:31:56Z",
"opaqueUserId": "<string>",
"items": [
{
"productId": "<string>",
"unitPrice": 123,
"quantity": 1,
"vendorId": "<string>"
}
],
"id": "<string>",
"deviceType": "desktop",
"channel": "onsite"
}
],
"pageviews": [
{
"page": {
"type": "home",
"pageId": "<string>",
"value": "electronics"
},
"occurredAt": "2023-11-07T05:31:56Z",
"opaqueUserId": "<string>",
"id": "<string>",
"deviceType": "desktop",
"channel": "onsite"
}
]
}
'{
"errCode": "bad_request",
"docUrl": "<string>",
"message": "<string>"
}Use the /events endpoint to report user interactions and activity in on a marketplace:
Interactions require either a resolvedBidId, for sponsored events coming from the /v2/auctions response,
or an entity that describes the entity that was interacted with, in the case of organic or non-sponsored events.
For analytics purposes, you can use the placement field to differentiate different listings or banners.
For example, on a product page with a carousel of products, you can track impressions and clicks related to the carousel
by including /carousel at the end of the path field in the placement object. This allows you to monitor
the performance of carousel products in the Data Room.
curl --request POST \
--url https://api.topsort.com/v2/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"impressions": [
{
"occurredAt": "2023-11-07T05:31:56Z",
"opaqueUserId": "<string>",
"id": "<string>",
"resolvedBidId": "<string>",
"entity": {
"id": "<string>",
"type": "product"
},
"placement": {
"path": "<string>",
"position": 2,
"page": 2,
"pageSize": 2,
"productId": "<string>",
"categoryIds": [
"<string>"
],
"searchQuery": "<string>"
},
"additionalAttribution": {
"id": "<string>",
"type": "product"
},
"page": {
"type": "home",
"pageId": "<string>",
"value": "electronics"
},
"object": {
"type": "listing",
"assetId": "<string>",
"clickType": "product"
},
"externalCampaignId": "<string>",
"externalVendorId": "<string>",
"deviceType": "desktop",
"channel": "onsite"
}
],
"clicks": [
{
"occurredAt": "2023-11-07T05:31:56Z",
"opaqueUserId": "<string>",
"id": "<string>",
"resolvedBidId": "<string>",
"entity": {
"id": "<string>",
"type": "product"
},
"placement": {
"path": "<string>",
"position": 2,
"page": 2,
"pageSize": 2,
"productId": "<string>",
"categoryIds": [
"<string>"
],
"searchQuery": "<string>"
},
"additionalAttribution": {
"id": "<string>",
"type": "product"
},
"page": {
"type": "home",
"pageId": "<string>",
"value": "electronics"
},
"object": {
"type": "listing",
"assetId": "<string>",
"clickType": "product"
},
"clickType": "product",
"externalCampaignId": "<string>",
"externalVendorId": "<string>",
"deviceType": "desktop",
"channel": "onsite"
}
],
"purchases": [
{
"occurredAt": "2023-11-07T05:31:56Z",
"opaqueUserId": "<string>",
"items": [
{
"productId": "<string>",
"unitPrice": 123,
"quantity": 1,
"vendorId": "<string>"
}
],
"id": "<string>",
"deviceType": "desktop",
"channel": "onsite"
}
],
"pageviews": [
{
"page": {
"type": "home",
"pageId": "<string>",
"value": "electronics"
},
"occurredAt": "2023-11-07T05:31:56Z",
"opaqueUserId": "<string>",
"id": "<string>",
"deviceType": "desktop",
"channel": "onsite"
}
]
}
'{
"errCode": "bad_request",
"docUrl": "<string>",
"message": "<string>"
}A valid API key generated in Topsort's UI.
Event data including impressions, clicks, purchases, and page views.
A batch request containing multiple events to be reported to Topsort.
An array of impression events
50Afficher attributs enfants
An array of click events
50Afficher attributs enfants
An array of purchase events
50Afficher attributs enfants
An array of page views
50Afficher attributs enfants
All events were reported successfully.
Cette page vous a-t-elle été utile ?