You should record transactions or purchases in Contlo using a special event called Charged.
What makes Charged a special event?
- Charged is a special event because it provides a way for you to specify the items sold, their categories, transaction amount, the transaction id, and the information about your users.
- Recording a purchase against a user marks them as a customer in Contlo. This enables you to compare your funnel reports between customers and non-customers.
- Recording the Transaction Amount
The transaction total or charge should be recorded in an event property called Transaction value.
Mandatory Properties to record a Charged event
Parameter | Type | Description |
---|---|---|
event_id | string | Used to map the event. |
transacation_value | string | The value attributed to the revenue. |
variant_id | string | The corresponding variant(s) ID for which transaction is taking place. |
event_type | string | Type of event (Charged) |
currency | string | Currency code of variant prices. Follow ISO 4217:2015 Format: https://en.wikipedia.org/wiki/ISO_4217 |
transaction_id | string | Unique identifier of the transaction. |
string | Email ID of the customer | |
phone number | string | Phone number of the customer. |
product_id | string | The corresponding product (s) ID for which the transaction is taking place. |
time | Long | Epoch time in milli seconds. |
{
"event_id":95962,
"event":"order_placed",
"email":"[email protected]",
"phone_number":"+911234567890",
"properties":{
"event_type":"charged",
"transaction_value":6600,
"transaction_id":"pay_N0km1m5ZSVp5kd",
"order_id":"12344abc",
"currency":"inr",
"total_discount":123.34,
"shipping_price":100.00,
"subtotal_price":200,
"total_tax":1234.00,
"product_ids":[
"20998",
"18318",
"18312"
],
"collection_ids":[
],
"variant_ids":[
"20998INR",
"18318INR",
"18312INR"
],
"product_prices":[
100,
200,
300
],
"product_quantities":[
2,
1,
1
]
},
"device_event_time":1669899600000
}
Advantages of the Charged Event
- Helps you identify your customers, and how are they using your app or website
- Run campaigns to reward loyal users or get lost customers back
- Measure customer loyalty via running a cohort analysis on repeat purchases
- Analyze paid campaign performance by total revenue earned
- Get revenue insights like – total revenue, number of transactions, count of paying users and much more.
Key Pointers to keep in mind-
- Please send 0 incase there is no discount/shipping price etc. and do not send null.
- Subtotal price is before adding the tax and discount.
- Please ensure to keep the products updated on Contlo to avoid any mismatch of product ids mapping.
- No. of items in the arrays for product prices and quantity should be equal.