Sign inGet started
Learn

Revenue tracking

View as MarkdownOpen in ChatGPTOpen in Claude
Connect your agent
Add to CursorAdd to VS Code

Track revenue on your website so every order ties to the visit, channel and campaign it came from, from the browser, your server or WooCommerce.

Updated

Revenue tracking ties each order on your site to the visit it came from, so you can see which channels and campaigns make money, not only traffic. With nextanalytica, you record an order with one call, order({ ref, value, currency }), from the page, from your server or from the WordPress plugin for WooCommerce. Your agent then reads revenue by channel, campaign and landing page, in your project's currency, and next to ad spend.

How do you record an order?

From the page where the order is confirmed:

window.nextanalytica.order({ ref: "A-10492", value: 129.9, currency: "EUR" });

ref is your order's reference, so the same order sent twice counts once. The currency is three capitals, such as EUR or USD.

What about orders the browser never sees?

Some payments are confirmed later or elsewhere: a bank transfer, a subscription renewal, a payment page on another domain. Send those from your server with a server key, as an order event with your own user id:

curl -X POST https://t.nextanalytica.app/s \
  -H "Authorization: Bearer nask_…" -H "Content-Type: application/json" \
  -d '{"events":[{"type":"order","user_id":"u_42","value":49,"currency":"EUR","ref":"A-1001"}]}'

An order from your server belongs to no visit, so it counts under the channel "Server". Keep the key on your servers, never in a page. See Segment and RudderStack for how to make one.

On WordPress, the nextanalytica plugin counts WooCommerce orders as purchases on its own. See WordPress and WooCommerce.

How do you read revenue?

Revenue is kept in each order's own currency, and turned into your project's currency where you compare across them. Ask your agent:

  • "Revenue by channel this month, against last month."
  • "Which campaigns brought orders, and which only brought visits?"
  • "Which landing pages lead to the most revenue per visit?"
  • "What's our return on ad spend by platform?"

Return on ad spend is revenue divided by ad spend, both in your project's currency: 2 means 2 back for each 1 spent. It needs an ad account connected as a source, such as ChatGPT Ads. See Sources.

What about revenue from AI assistants?

Orders in visits from ChatGPT, Claude or Perplexity count in the AI assistants channel, and your agent can see the orders in visits that followed an assistant's fetch of the same page. See AI traffic analytics.

Next steps

Related
  • How to check your website traffic: Four ways to check your website's traffic, from analytics to Search Console and server logs, what each one counts, and how to ask your agent instead.
  • Bounce rate: What bounce rate means, how it's calculated in nextanalytica and in GA4, why the two differ, and how to find the pages people leave.
  • UTM tags: What UTM tags are, the parameters and which ones to always set, naming rules that keep reports clean, and how to read campaigns by UTM with your agent.
  • Attribution models: How your agent credits each order to the visits before it, by last click, first click or linear, with ROAS by ad account and LTV by channel.
  • ROAS by ad: How your agent shows spend, orders, revenue and ROAS for each Meta and Google ad, and the one setting Meta needs so a visit names its ad.
  • How to track website traffic: How to set up website tracking that tells you where visitors come from and what they do: the tag, events, UTM tags, consent, search data and AI crawlers.
Still have questions?
Was this page useful?