Documentation
From your first visit
to your first payment.
Step-by-step guides for installing traffic.cx, checking that visits arrive and connecting your checkout so you can see where paying customers come from.
Quick start
Three steps from a new account to revenue by source. You only need access to your site's HTML.
-
Install the script
Add your site in the dashboard and paste its one-line script into your HTML head.
Step 1 of 3Open
-
Verify your first visit
Open your site in a normal browser tab and watch the visit appear in Realtime.
Step 2 of 3Open
-
Connect payments
Link Stripe, Polar, Lemon Squeezy or Dodo Payments to see which sources earn money.
Step 3 of 3Open
Start here
Install the tracker, then learn how a payment is matched to the visit that brought it.
-
Install & verify
Add your site's tracking script, check that visits arrive, handle single-page navigation and troubleshoot common installation problems.
5 min readRead
-
Revenue & attribution
How traffic.cx ties each payment to the visit that brought it: revenue, RPV and conversion rate by channel, source and campaign, and how to send payments.
6 min readRead
Payment providers
Connect your checkout so every payment and refund lands next to the traffic that earned it.
-
Stripe
Step-by-step setup: create a restricted Stripe key, connect it in traffic.cx, pass visitor IDs in Checkout metadata, and verify payments, renewals and refunds.
4 min readRead
-
Dodo Payments
Connect Dodo Payments to traffic.cx with an API key, and pass the visitor's IDs as checkout metadata.
3 min readRead
-
Lemon Squeezy
Step-by-step setup: create a Lemon Squeezy API key, connect it in traffic.cx, pass tcx_pvid as checkout custom data, and verify orders, renewals and refunds.
3 min readRead
-
Polar
Connect Polar to traffic.cx with an organization access token, and pass the visitor's IDs as checkout metadata.
3 min readRead
Custom integrations
Report a purchase from a thank-you page when your checkout has no connector.
-
Script purchases
Report purchases from a thank-you page with trafficcx('purchase') when your checkout has no connector, and how verified payments replace them.
3 min readRead
Search data
Bring Google's search terms and pages in next to your traffic.
-
Google Search Console
Connect Search Console with Google sign-in, pick your property, and see the Google search terms behind your traffic, with estimated revenue per term.
7 min readRead
Widgets
Show live visitors, visit counts, charts and revenue on your own site or in a README.
-
Embed a widget
Put live visitors, visit counts, charts and a revenue badge on your own site, in any website builder or a GitHub README. Steps for each platform.
8 min readRead
-
Custom templates
Write a traffic.cx widget in your own HTML and CSS with placeholders for live visitors, totals, lists and the ticker, and save it for every site in your team.
5 min readRead
API
Read stats, manage sites and send events or payments from your own servers with a team key.
-
API keys
Create a team API key with only the permissions it needs to read stats, manage sites, and send events or payments to traffic.cx from your own servers.
3 min readRead
-
Stats API
Query visitors, sources, pages, goals and revenue for any of your sites, with the same query model the dashboard uses.
4 min readRead
-
Sites API
Add, change and remove sites, goals and chart notes from your own code, for agencies and platforms with many sites.
3 min readRead
-
Events API
Send pageviews and custom events from your server with the Events API, for sign-ups, API calls and visits the browser script can't see.
4 min readRead
-
Payments API
Send verified payments to traffic.cx from any server with the Payments API: for your own billing or a provider without a connector, with attribution IDs.
4 min readRead
Plans
What each plan includes, how events are counted, and how long data is kept.
-
Plans & limits
What the Free plan and paid plans include, how monthly events are counted, what happens when you go over, how far back you can see, and when data is deleted.
5 min readRead
Can't find what you need?
Tell us which step you're on and what you see, and we'll help you finish the setup.