How to set up a purchase goal
Set up conversion tracking with a purchase goal, revenue read from your events, one total per currency, and the time from first visit to paid plan.
MIRA FIVE follows each consenting person from first visit to paid invoice, with Google Ads cost per paying customer.
Sample conversion journeys: 8 buyers came direct, 7 via paid search and then direct, 5 via organic search, 4 via paid social, email and then direct, and 3 via an AI assistant and then organic search. Buyers bought after a median of 10 days.
Mark the trial start as a Conversion goal and the first payment as your Purchase goal. The trial goal shows where its people first came from; Acquisition shows which channels brought the ones who paid. Conversion journeys list every channel a customer came through before paying.
Connect Google Ads, and spend arrives daily, joined to the visits it paid for. With the payment as your Purchase goal, each campaign's cost per buyer counts paying customers, not sign-ups. Campaigns that spend without matched visits are flagged, with the tag to add.
A funnel from pricing page to sign-up to first payment shows where people stop, counted by person over up to 30 days. Each step opens the people who stopped there, with every visit and event. An Intent goal on the pricing page lists who looked and has not paid yet.
The default script counts visits, pages and sign-ups without cookies. Following a person from first visit to paid plan needs their consent, and the dashboard shows the share who agreed. Hosting is one part of compliance; the rest depends on what you collect and why.
Three pieces: the script in the head of your site and app, the consent line from your banner, and the payment event from your backend. The setup page lists who does what, ready to send to your developer. Each source's Install tab also offers “Let your coding agent install it”, a prompt for Claude Code, Cursor or Codex.
identify on sign-in, reset on sign-outWhen your payment provider reports a paid invoice, your own webhook handler sends the event with the secret key of a server source. Use the id your app passes to identify at sign-in, so the payment lands on that person. The invoice id as idempotency key makes a repeated webhook count once.
The code for webhooks/payment.ts: import { Mira } from '@mirafive/sdk-server' const mira = new Mira({ key: process.env.MIRAFIVE_SECRET_KEY }) // in the handler for a paid invoice await mira.send( [{ name: 'subscription_paid', userId: customer.id, properties: { revenue: 49, currency: 'EUR' } }], { idempotencyKey: invoice.id }, )
A typical path, as MIRA FIVE records it. Someone finds your product through a Google search and reads the pricing page. A week later they come back through your newsletter and start a trial. Two weeks after that, the first invoice is paid.
Their page under People follows the stages: Visitor on the first visit, Returning on the second,
Known after signing in, Customer with the first payment. Because your app calls identify at sign-in,
the earlier visits in that browser join the account. The payment your server sends carries the same id,
so it lands on the same person, next to the search that first brought them.
Acquisition counts that person as a buyer for Organic search by first touch, or for Email by last touch. The Purchase goal adds time to purchase, from first visit to first payment, as a median across all paying customers. How to set up a purchase goal walks through the goal itself.
When you change onboarding or pricing, a feature flag rolls the change out to a share of people and turns it off with one switch. An A/B test measures it against the original, decided by the goal you pick. Both use the same people and the same goals, so paid plans can decide a pricing page test, not clicks.
identify call. The rest is the script and a consent line. The setup page lists every step, and the Install tab has a prompt for Claude Code, Cursor or Codex.Set up conversion tracking with a purchase goal, revenue read from your events, one total per currency, and the time from first visit to paid plan.
Rank marketing channels by the buyers they bring instead of visits, with first or last touch, revenue per channel, campaigns and Google Ads cost per buyer.
Build a conversion funnel of two to six steps, see where buyers drop out between them, and open the people who stopped. Counted by person or by visit.