How to track Abandoned Carts
Abandoned cart tracking measures how many visitors or customers leave the portal before completing a purchase, with items still in the cart. When a customer leaves a hosted page or checkout page unattended for 30 minutes, Chargebee counts an Abandoned Cart. Read more in Abandoned carts.
Chargebee generates a report to track the abandoned carts. To view the report in Chargebee Billing:
- Enable the Track abandoned carts setting in Settings > Configure Chargebee > Checkout and Self-Serve Portal > Configuration > Advanced Settings.
- You can then view the report at Settings > Configure Chargebee > Checkout and Self-Serve Portal > Reports > Abandoned Carts.
When classic hosted-page reports are disabled on your site, the Abandoned Carts report redirects instead of opening. That report is listed among descoped classic reports. Use the List hosted pages API below to track abandoned carts.
_ _
To track abandoned carts through the API, the Hosted Pages resource includes checkout_info. This attribute keeps the customer's actions and the information they enter during checkout, and Chargebee logs it every 5 seconds. For every action on the hosted pages, updated_at and state are updated.
You can filter the data with the attributes below:
-
updated_at - timestamp indicating when this hosted page was last updated
-
state - records whether the checkout succeeded (the values are created, requested, succeeded, canceled, and acknowledged)
-
type -
checkout_neworcheckout_existing, based on the customers you are tracking
To identify customers who may have abandoned a cart, poll the List hosted pages API regularly. Set the updated_at range to end at least 30 minutes before each poll, and use these filters:
updated_at = set to a specific time range
state = "requested"
type = "checkout_new" or "checkout_existing"
checkout_info includes the customer details (email address, first name, and last name) you can retrieve for retargeting, and the failure reason, if any.
The List hosted pages API is eventually consistent. After you poll, retrieve each candidate hosted page by ID before you retarget or send a reminder. Retrieve responses are strongly consistent. Send a reminder only when the retrieved page still shows state = "requested".
Email Reminders:
You can email customers about their abandoned carts so they can finish checkout. To configure the emails and their content, go to Settings > Configure Chargebee > Email Notifications > Abandoned Cart Reminders. _
You can send a reminder from 30 minutes to 30 days after the cart is abandoned. You can configure more than one reminder email.
To protect your customers' privacy, tell them when this feature is in use.