Recommended events
These events let you measure additional features and behavior and generate more useful reports in Oppizi. Because these events require additional context to be meaningful, they are not sent automatically. Use this article to see the required and optional parameters for each event
All events should be sent to the Create event endpoint
POST https://developer-api.oppizi.com/events
signup
This event indicates that a user has signed up for an account.
Parameters
userId
required
Enables us to link the signup to any future orders made by the same user. Will be hashed by us.
coupon
required
Add if a promotional code was used during signup.
metadata
optional
Could be key/value as string
or string[]
.
Supports maximum 50 entries.
Key length has a limit of 40 characters maximum. Value length has a limit of 256 characters maximum.
Request body
{
"eventName": "Signups",
"userId": "e5554129-8abe-4ff8-8654-99722fa72313",
"coupon": "SALE234",
"metadata": {
"orderId": 182394
}
}
Example
fetch('https://developer-api.oppizi.com/events', {
method: 'POST',
headers: new Headers({
'Content-Type': 'application/json',
Authorization: 'Bearer YOUR_SECRET_KEY',
}),
body: JSON.stringify({
eventName: 'Signups',
userId: 'e5554129-8abe-4ff8-8654-99722fa72313',
coupon: 'SALE234',
metadata: {
orderId: 182394,
},
}),
});
conversion
This event signifies when conversion of the next types happened: signup, order, purchase, redeem, eater, ride, FTE
Parameters
type
required
One of: "Signups", "Orders", "First Order", "Purchases", "First Purchase", "Redeems", "First Redeem", "Eaters", "First Eater"
Type of the conversion event
transactionId
required
Enables us to combine a user's orders in order to capture their first order and level and frequency of their spending. Will be hashed by us.
value
required
The monetary value of the order. Format to 2 decimals (123.45).
currency
required
The currency of the order as a 3 letter abbreviation (USD, EUR, GBP, AUD..).
userId
required
Allows us to match future orders from users who previously used an Oppizi promotion code.
coupon
optional
Add if some discount code was used during purchase.
discount
optional
The monetary value of any discount applied to this event. Format to 2 decimals (123.45). If the discount resulted in $10 off, the value provided should be "10.00", not "-10.00".
metadata
optional
Could be key/value as string
or string[]
.
Supports maximum 50 entries.
Key length has a limit of 40 characters maximum. Value length has a limit of 256 characters maximum.
Request body
{
"eventName": "conversion",
"type": "Purchases",
"transactionId": "03be7767-def7-4c53-a48c-241d1f828381",
"value": "300",
"currency": "USD",
"userId": "e5554129-8abe-4ff8-8654-99722fa72313",
"coupon": "SALE845",
"discount": "15",
"metadata": {
"orderId": 182396
}
}
Example
fetch('https://developer-api.oppizi.com/events', {
method: 'POST',
headers: new Headers({
'Content-Type': 'application/json',
Authorization: 'Bearer YOUR_SECRET_KEY',
}),
body: JSON.stringify({
eventName: 'conversion',
type: 'Purchases',
transactionId: '03be7767-def7-4c53-a48c-241d1f828381',
value: '300',
currency: 'USD',
userId: 'e5554129-8abe-4ff8-8654-99722fa72313',
coupon: 'SALE845',
discount: '15',
metadata: {
orderId: 182396,
},
}),
});