Set up MIRA FIVE with your developer.
You click through three screens. Your developer, or their coding agent, adds a few lines to the site. This page lists both, in order, so you can send it on.
No developer at hand? The script alone goes into any site that lets you add code to the head.
You, in the dashboard
- Create the project and a website source
- Mark the paid order as a purchase goal
- Connect Google Ads
Your developer, in the site
- Add the script to every page
- Pass the consent answer
- Send the paid order
Setup takes seven steps, and four of them need no code. Your developer adds the script, the consent line and the paid order. You create the project and its source, check with your developer that events arrive, mark the paid order as a purchase and connect Google Ads.
First, decide how it collects.
Each website source has a collection mode. It decides what MIRA FIVE can show.
Consentless
The default. Counted as visits.
- No cookies, nothing stored on the device
- Visits, pages, channels and campaigns
- Events and conversions per visit
- People, buyers and cost per buyer read “Needs consent”
Full
Behind your consent banner. Followed as a person.
- Nothing sent until the visitor agrees
- Buyers per channel and the person behind each purchase
- Google Ads cost per buyer
- Ids kept in localStorage, never in cookies
Buyers per channel and cost per buyer need visitors who agreed. If your site already shows a consent banner, choose Full. A Full source can also count visitors who decline, without cookies, when each page chooses the mode per visitor.
Seven steps, in order.
The menu names are the ones in the app. The docs have every detail for your developer.
Create the project and a website source
YouSign up, create a project, then go to Data → Sources → Add source and choose Website. Enter the site’s address under Allowed origins and pick the collection mode. The source comes with its website key (
mf_…) on the Install tab.Add the script to every page
Your developerTwo lines in the head of every page, about 4 kB. For a Full source add
data-mode="full"; for a consentless one leave it out. React, Next.js, Vue, Nuxt, Astro, Laravel and Symfony have their own packages. Or let a coding agent do it: the source’s Install tab has Let your coding agent install it, a prompt for Claude Code, Cursor or Codex with the key, the allowed origins, every step and the check.The script in the page head: a one-line queue, then a deferred script tag loading mira.js from cdn.mirafive.io with the website key and data-mode="full".
Pass the consent answer
Your developerFor a Full source only. Nothing is sent until the banner passes the visitor’s answer.
truemeans statistics only,falseforgets the ids and the user and clears the queue, and an object sets statistics, experiments and targeting one by one. When someone signs in,identifyjoins their visits to your own user id;reseton sign-out. Works with your consent banner; the docs show a Cookiebot example.Two calls: mirafive consent with the visitor’s statistics answer, from the consent banner, and mirafive identify with the signed-in user’s id.
Send the paid order
Your developerThe purchase needs its revenue and currency. The quickest way is one line on the order confirmation page, which in full mode lands on the person who paid.
On the order confirmation page: mirafive track order_paid with revenue 328 and currency EUR.
More exact: send it from the server, where ad blockers and closed tabs cannot lose it and a repeated webhook counts once. Pass the same user id the page gives
identify. SDKs for Node.js, PHP, Laravel and Symfony do the sending.From the server with @mirafive/sdk-server: send order_paid with the customer id as user id, revenue 328 in EUR, and the order id as idempotency key.
Check that it arrives
TogetherOpen the site on its real domain, since localhost sends nothing by default, and accept the banner for a Full source. Your visit shows up under Data → Live within seconds, and the project’s setup guide switches to Receiving events. The first real order then shows under Data → Events.
Mark the paid order as a purchase
YouOnce the first order has arrived, open Goals → New goal, name it, choose the event
order_paidand set the goal to Purchase. Revenue comes from the event’srevenueproperty, per currency. From then on the dashboard counts buyers.Connect Google Ads
YouGo to Data → Sources → Add source, choose Google Ads, sign in with Google and pick the ad account. Spend arrives every day, and each campaign shows its cost per buyer. Auto-tagging’s click id joins a click to its campaign; if Acquisition lists paid visits without a campaign, add this to the final URL suffix in Google Ads under Admin → Account settings → Tracking.
The final URL suffix for Google Ads: utm_campaign equals the campaign id placeholder.
For your developer.
The facts to check before and after the change.
- Website key
mf_…, public by design: it can only send events and read the source’s flags, and only from its allowed origins.- Secret key
- For server events. Read from
MIRAFIVE_SECRET_KEY, shown once, never in browser code. - Endpoints
- Browsers send to
events.mirafive.io/v1/batch/<website key>, servers toevents.mirafive.io/v1/batchwith the secret key. - Content Security Policy
connect-src https://events.mirafive.io, and for the script tagscript-src https://cdn.mirafive.io.- Storage
- No cookies in any mode. In full mode, ids in localStorage after consent; nothing before.
- Sends nothing
- From localhost unless allowed, from bots, and from browsers with Do Not Track or Global Privacy Control.
- Retries
- Each batch id counts once; an idempotency key makes a repeated webhook count once.
Questions about setup.
Do I need a developer?
How long does it take?
Is there a plugin for Shopify, Shopware or WooCommerce?
How does my developer get the key?
Can we test before the site goes live?
data-track-localhost, so development stays out of your numbers. To keep your own visits on the live site out, set window.__mirafive_ignore, as the docs describe.Create the project, then send this page.
Free up to 25,000 events a month, no card. The first visits show up live.