# See your website's buyers per channel

> Add MIRA FIVE to any site whose head you can edit, from a CMS to a shop theme. Two lines count every visit, and one more records the paid order.

URL: https://mirafive.io/for/website  
Updated: 2026-09-28

Two lines in the head of every page count each visit, and one more on the confirmation page records the paid order with its revenue.

Package `@mirafive/tracker`

## Set up in 4 steps

1. ### Paste the two lines into the head  
Take the website key (`mf_…`) of your website source from **Data → Sources**, put it in `data-key` and paste both lines into the `<head>` of every page, usually the theme header or shared layout. The key is public and safe in page source.  
```  
<script>window.mirafive=window.mirafive||function(){(mirafive.q=mirafive.q||[]).push(arguments)}</script>  
<script defer src="https://cdn.mirafive.io/mira.js" data-key="mf_…"></script>  
```
2. ### Pass your banner's answer  
For a Full source only. Add `data-mode="full"` to the tag, and nothing is sent or stored until the visitor answers. Wire your banner to the `consent` verb: `true` grants statistics only, `false` forgets the ids and the user, and `{ statistics, experiments, targeting }` answers each scope. The docs show a Cookiebot example.  
```  
<script>window.mirafive=window.mirafive||function(){(mirafive.q=mirafive.q||[]).push(arguments)}</script>  
<script defer src="https://cdn.mirafive.io/mira.js" data-key="mf_…" data-mode="full"></script>  
<script>  
  // Call from your banner whenever the visitor answers or changes their choice.  
  mirafive('consent', { statistics: agreedToStatistics, experiments: agreedToPreferences, targeting: agreedToMarketing })  
</script>  
```
3. ### Send the paid order  
On the page that confirms the payment, one more line records the order with its revenue and currency. It works with the script tag alone, and in full mode with consent it lands on the person who bought.  
```  
<script>  
  mirafive('track', 'order_paid', { revenue: 328, currency: 'EUR' })  
</script>  
```
4. ### Check the live view  
Open the site on its real domain; localhost sends nothing unless you add `data-track-localhost`. Run `mirafive('flush')` in the console, look for the batch to `events.mirafive.io` answering `202`, and find your visit under **Data → Live**.

MIRA FIVE is analytics built around the person. The hosted script, `@mirafive/tracker`, is for any site where you can edit the head: a CMS, a site builder, a shop theme or static HTML. It is about 4 kB, needs no build step, and records a pageview for the landing page and every client-side navigation.

## Where do the two lines go?

Into the `<head>` of every page, wherever your system keeps it: the theme header, the shared layout or the base template. There is no plugin for Shopify, Shopware, WooCommerce or WordPress, so the lines go into the theme like any other script. Load `mira.js` by `src`; it does not work inlined. On Laravel and Symfony, the server package prints the tag for you: see the [Laravel](https://mirafive.io/for/laravel) and [Symfony](https://mirafive.io/for/symfony) setups.

## How does a paid order reach its channel?

Through the person who paid. In full mode, after the visitor agreed, identify signed-in customers with your own user id and forget them on sign-out:

```html
<script>
  // After login
  mirafive('identify', 'user_123', { plan: 'pro' })

  // After logout
  mirafive('reset')
</script>
```

The `order_paid` from the confirmation page then lands on that person, next to the channel of their first visit. Ids live in localStorage, never in cookies. Create a purchase goal for `order_paid`, and Acquisition shows buyers and revenue per channel and campaign.

## What else can the tag do?

- `data-autocapture` records clicks, form submits and field changes without code, never what a visitor typed.
- `data-host` sends events through a proxy on your own domain.
- The same files are on npm as `@mirafive/tracker`, if you would rather host the script yourself.

The source’s Install tab has **Let your coding agent install it**, a prompt for Claude Code, Cursor or Codex with the key, every step and the check. The [script tag docs](https://docs.mirafive.io/sdks/script-tag) list every attribute, and the [setup page](https://mirafive.io/setup) shows who does what, in order.

## Other setups

The same numbers, whichever way your site is built.

- [Astro](https://mirafive.io/for/astro)
- [Next.js](https://mirafive.io/for/nextjs)
- [React](https://mirafive.io/for/react)
- [Laravel](https://mirafive.io/for/laravel)
- [Nuxt](https://mirafive.io/for/nuxt)
- [Symfony](https://mirafive.io/for/symfony)
- [PHP](https://mirafive.io/for/php)
- [Vue](https://mirafive.io/for/vue)
- [TanStack Start](https://mirafive.io/for/tanstack-start)
- [Node.js](https://mirafive.io/for/nodejs)
- [Convex](https://mirafive.io/for/convex)
- [JavaScript](https://mirafive.io/for/javascript)

[Read the docs](https://docs.mirafive.io)

## Questions and answers

### Is there a plugin for Shopify, Shopware, WooCommerce or WordPress?

No. The two lines go into the theme's head like any other script, and the paid order is one more line on the page that confirms it. Whoever edits your theme can add both. On Shopify the order status page no longer runs your own scripts, so send the paid order from a server that receives the order webhook.

### What does the default setup collect?

Visits, pages, channels, campaigns, countries, devices and events. It sets no cookie, stores nothing on the device and sends no identifier. IP addresses are used to look up country and region and are never stored with your analytics data.

### Does it count pages in a single-page app?

Yes. Automatic pageviews follow every same-document navigation. For hash routes such as `/#/pricing`, add `data-hash`; for full control, add `data-manual` and call `mirafive('pageview')` yourself.

### What does my Content Security Policy need?

`script-src https://cdn.mirafive.io` and `connect-src https://events.mirafive.io`. The inline queue line needs the page's nonce or its hash in `script-src`.

## See which channel brings buyers

Free for 25,000 events a month. No card needed.

[Start free](https://app.mirafive.io/register)[See pricing](https://mirafive.io/pricing)
