# Switching from Plausible

Swap the tag, carry your events and goals across, and bring the site’s history with it.

## Add the tag

[Add the site](https://fiveb.ar/docs/install.md#add-the-site), then put fivebar’s tag in the `<head>` of every page, beside Plausible’s:

```
<script async data-domain="example.com" src="https://fiveb.ar/js/tally.js"></script>
```

Run both for a few weeks to compare the same days, then remove Plausible’s tag and its snippet.

What Plausible’s optional measurements do, fivebar does with the tag or an attribute on it:

| In Plausible | In fivebar |
| --- | --- |
| Outbound links, file downloads and form submissions | Counted with the tag alone, as [links, downloads and forms](https://fiveb.ar/docs/outbound-and-downloads.md) |
| 404 error pages | Counted with the tag alone, as [error pages](https://fiveb.ar/docs/errors/server.md), with `data-status="404"` on the tag for Safari |
| Custom properties on pageviews | [`data-property-author="Ada"`](https://fiveb.ar/docs/script-attributes.md#data-property-name) on the tag |
| A custom URL in place of the page’s own | [`data-path="/login/:token"`](https://fiveb.ar/docs/script-attributes.md#data-path) on the tag |
| Hash-based routing | Not counted apart: switch the router to real paths, as [Single-page apps](https://fiveb.ar/docs/single-page-apps.md#apps-that-route-after) says |

## Events and goals

Each `plausible()` call becomes a [`tally()`](https://fiveb.ar/docs/events.md) call with the same name, and its `props` as the data:

| Plausible | fivebar |
| --- | --- |
| `plausible('Signup')` | `tally('Signup')` |
| `plausible('Signup', { props: { plan: 'pro' } })` | `tally('Signup', { plan: 'pro' })` |
| `plausible('Purchase', { revenue: { amount: 19.99, currency: 'GBP' } })` | `tally('Purchase', { revenue: 19.99, currency: 'GBP' })` |
| `plausible('Signup', { callback: done })` | `tally('Signup', {}, done)` |
| `class="plausible-event-name=Signup plausible-event-plan=pro"` | `data-tally="Signup" data-tally-plan="pro"` |

Where your pages queue calls before Plausible’s script loads, queue them for fivebar’s as [Custom events](https://fiveb.ar/docs/events.md#before-the-script-has-loaded) shows. An event keeps up to 8 names in its data: see [Data](https://fiveb.ar/docs/events.md#data).

Every event is a goal already, so custom event goals need no setting up. A pageview goal, such as `/thanks`, becomes a [page goal](https://fiveb.ar/docs/goals.md#page-goals) in the site’s settings, with `*` for anything.

## Bring the history over

Once fivebar is counting, export the site from Plausible and import the zip under Import in the site’s settings. The dashboard then reaches back before fivebar’s first day: see [Importing from Plausible](https://fiveb.ar/docs/import/plausible.md).

---

fivebar is web analytics without cookies, at https://fiveb.ar. Every page of its docs is listed at https://fiveb.ar/docs/index.md.
