Eventy transakcyjne — deprecated
⚠️
Opisane tutaj są stare endpointy do wysyłania eventów transakcyjnych (zakup, koszyk, wishlist).
Zalecamy korzystanie z nowego endpointu
/v1/ev/transaction, który obsługuje wszystkie typy transakcji w jednym miejscu.Zakup, dodanie produktu do koszyka i wishlisty — deprecated
Eventy wysyłane po interakcjach użytkownika, które mogą zostać zaatrybuowane do kampanii reklamowej. Należy wysyłać wszystkie takie zdarzenia: określenie, czy konkretne zdarzenie (zakup produktu, dodanie do koszyka) jest powiązane z jakąkolwiek kampanią reklamową jest po stronie AdsHero.
Parametry eventId oraz brand i sellerId w jsonie opisującym produkt są w przypadku eventów tego typu opcjonalne.
Mimo wszystko mocno rekomendowana jest wysyłka eventId, ponieważ służy on do wykrywania duplikatów eventów i dzięki niemu wartości wyliczanej atrybucji nie będą zawyżane.
W przypadku tych eventów jest inna domena, pod którą są one wysyłane: event-dispatcher.ahevds.com zamiast dispatcher.ahevds.com.
Zakup
POST https://event-dispatcher.ahevds.com/v1/events/purchase HTTP/2
Content-Type: application/json
cid: {cid}
uid: {uid}
{
"shopId": "string",
"currency": "string",
"products": [
{
"shopProductId": "string",
"productTitle": "string",
"price": 102.54,
"quantity": 0,
"brand": "string",
"sellerId": "string"
}
],
"eventId": "string"
}curl --location --request POST 'https://event-dispatcher.ahevds.com/v1/events/purchase' \
--header 'Content-Type: application/json' \
--header 'cid: {cid}' \
--header 'uid: {uid}' \
--data '{
"shopId": "string",
"currency": "string",
"products": [
{
"shopProductId": "string",
"productTitle": "string",
"price": 102.54,
"quantity": 0,
"brand": "string",
"sellerId": "string"
}
],
"eventId": "string"
}'Dodanie do koszyka
POST https://event-dispatcher.ahevds.com/v1/events/cart HTTP/2
Content-Type: application/json
cid: {cid}
uid: {uid}
{
"shopId": "string",
"currency": "string",
"products": [
{
"shopProductId": "string",
"productTitle": "string",
"price": 102.54,
"quantity": 0,
"brand": "string",
"sellerId": "string"
}
],
"eventId": "string"
}curl --location --request POST 'https://event-dispatcher.ahevds.com/v1/events/cart' \
--header 'Content-Type: application/json' \
--header 'cid: {cid}' \
--header 'uid: {uid}' \
--data '{
"shopId": "string",
"currency": "string",
"products": [
{
"shopProductId": "string",
"productTitle": "string",
"price": 102.54,
"quantity": 0,
"brand": "string",
"sellerId": "string"
}
],
"eventId": "string"
}'Dodanie do wishlisty
POST https://event-dispatcher.ahevds.com/v1/events/wishlist HTTP/2
Content-Type: application/json
cid: {cid}
uid: {uid}
{
"shopId": "string",
"currency": "string",
"products": [
{
"shopProductId": "string",
"productTitle": "string",
"price": 102.54,
"quantity": 0,
"brand": "string",
"sellerId": "string"
}
],
"eventId": "string"
}curl --location --request POST 'https://event-dispatcher.ahevds.com/v1/events/wishlist' \
--header 'Content-Type: application/json' \
--header 'cid: {cid}' \
--header 'uid: {uid}' \
--data '{
"shopId": "string",
"currency": "string",
"products": [
{
"shopProductId": "string",
"productTitle": "string",
"price": 102.54,
"quantity": 0,
"brand": "string",
"sellerId": "string"
}
],
"eventId": "string"
}'