Switching from Google Analytics
Swap the tag, carry your events and goals across, and bring the site’s history with it.
Add the tag
Add the site, then put fivebar’s tag in the <head> of
every page, beside Google’s:
<script async data-domain="example.com" src="https://fiveb.ar/js/tally.js"></script>If Google’s tag comes from Google Tag Manager, add fivebar’s there instead, as Platforms shows. Run both for a few weeks to compare the same days, then remove Google’s tag.
What Google’s enhanced measurement collects, fivebar counts with the tag alone, but for site search, which takes a rule:
| In Google Analytics | In fivebar |
|---|---|
| Page views, history changes among them | Pageviews, each page of a single-page app among them |
| Outbound clicks, file downloads and form interactions | Links to other sites, downloads and forms sent, as actions |
| Scrolls and engagement time | How far down each page was read and how long it was on screen, as engagement |
| Site search | A search rule in the site’s settings, naming the
parameter your search uses, such as q |
| Video engagement | Not counted: send an event of your own |
Events and goals
Each gtag('event', …) call becomes a tally() call with the
same name, and its parameters as the data:
| Google Analytics | fivebar |
|---|---|
gtag('event', 'sign_up', { method: 'email' }) | tally('sign_up', { method: 'email' }) |
gtag('event', 'purchase', { value: 19.99, currency: 'GBP' }) | tally('purchase', { revenue: 19.99, currency: 'GBP' }) |
dataLayer.push({ event: 'sign_up' }) | A Custom HTML tag in Tag Manager that calls tally('sign_up'),
fired by the same trigger |
An event’s data holds text, numbers, and true or false, up to 8 names, so leave out items and
other lists: see Data. Leave out user_id and user properties too: data is
kept as sent, so send nothing about a person.
Every event is a goal already, so there are no key events to mark. A key event made from a page view, such as
reaching /thanks, becomes a page goal in the site’s settings, with
* for anything.
Bring the history over
Once fivebar is counting, choose Continue to Google under Import in the site’s settings and pick the property. The dashboard then reaches back before fivebar’s first day: see Importing from Google Analytics. Google counts users with a cookie, so expect its visitors to differ from fivebar’s for the same days.