payment event from your own payment page. This guide helps you pick the right one, gives the exact call, and shows how to check that a sale was attributed.
Not a developer? Start with the Help Center articles on connecting Stripe and reading your revenue.
Pick your method
The answer depends on where your customers type their card details.
On a custom payment page, connecting Stripe is not enough on its own.
Before you start
- Install the Radar script on your site, and make sure your visits show up. Radar can only tie a sale to a visit it has seen. See check your installation.
- Have a Stripe account. Stripe is the payment provider Radar connects to.
Connect Stripe
Open your Radar project and follow the Stripe connection steps shown in the dashboard. Make sure you finish every step. Once the connection is active:- your payments feed the revenue figures at the top of the overview, the Revenue page, and the amount spent shown for each buyer on the People page;
- each paying customer is identified automatically, with the email and the name from their payment. See identify visitors.
Send a payment event from a custom payment page
When the payment happens on a page you built, your code tells Radar about the sale withvisitors.track. The call takes three arguments:
Two details matter:
- The name
paymentis exact. It is the only event name on which Radar copies the buyer’s name to the People page. The email is picked up on any event. - The amount and the currency go in the third argument, not among the properties.
When to send it
Send the event once the payment is confirmed, not when the buyer clicks the pay button. A declined card would otherwise count as a sale. Send it once per sale. If the call sits on a confirmation page, make sure that reloading the page does not send it a second time.order stands for your own order data. The first line skips the call when the Radar script is not loaded, so a blocked script never breaks your checkout. See protect your code when the script is missing.
Check that a sale was attributed
1
Make a test purchase
On your published site, arrive the way a customer would, for example from a link on another site, then buy something.
2
Look at the overview
Open your project in Radar. The Revenue and Sales figures at the top of the overview should include your test sale. If they stay empty, your payments are not connected yet, or the sale could not be matched with a visit.
3
Open the buyer on the People page
Go to People and click the buyer. Their history shows their visits, where they came from, and the amount they spent. Compare that amount and its currency with your test sale.
Check with the API
The same figures can be read from your own tools. The overview endpoint returnsrevenue, revenue_currency and sales for a date range:
revenue value for each person, and can sort people by revenue. See the metrics endpoint for the full answer. The Radar API is available from the Pro plan.
Sales are missing
Go through these points in order.- The Stripe connection is complete. Every step shown in the dashboard is done.
- You know where customers pay. On the Stripe Checkout page, the connection covers you. On your own payment page, the
paymentevent is required too. - The event is named exactly
payment, and the amount and the currency are in the third argument. - Your code reaches the call. An early
return, an error just before, or a missingvisitorsobject all skip it. The browser console shows the error. - The Radar script is on the site and your visits show up. See I installed the script but I see no data.
Good to know
- No webhooks. Radar does not notify your systems when a sale is recorded. Read your figures with the Radar API.
- Deleting a project deletes its revenue data. Deleting a Radar project deletes all its data.
This guide is about Radar, the analytics for your website. To track the sales that come from your taap.it links, see conversion tracking instead.
Next steps
Identify visitors
Which identity fields Radar reads, and the rule about names.
Send custom events
Track the steps before the sale: sign-ups, clicks and forms.