You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.
Following the documentation I tried to track an event, but nothing showed up in Klaviyo UI.
// Track a user's behavior - create an event in Klaviyo
KlaviyoClient.public.track({
event: 'Ordered Pizza',
email: 'pizza.dave@mailinator.com',
properties: {
items: [
{
size: 'Large',
toppings: [
'Pepperoni',
'Onions',
'Smoked Gouda'
],
price: 23.99
}
],
$value: 23.99
},
customerProperties: {
likesOnions: true
},
timestamp: 1532806824
});
Merging it with the documentation about API here:
https://help.klaviyo.com/hc/en-us/articles/360038562411-Setting-Up-API-based-Website-Activity-Events#server-side-requests2
I had to modify the event call for the event to work:
// adjusted version that works
KlaviyoClient.public.track({
event: 'Ordered Pizza',
email: 'pizza.dave@mailinator.com',
customer_properties: {
$email: 'pizza.dave@mailinator.com',
}.
properties: {
items: [
{
size: 'Large',
toppings: [
'Pepperoni',
'Onions',
'Smoked Gouda'
],
price: 23.99
}
],
$value: 23.99
},
time: 1532806824
});
The text was updated successfully, but these errors were encountered: