Sitebase
All articles

Do you need Google Analytics on a small website?

Decide whether GA4 is worth the cookies and consent work, or whether pageviews, sources, and top pages are enough.

You published a site on Webflow, Lovable, or a static host. The next suggestion is often “add Google Analytics.”

Open the live page and write down the questions you can act on this month. That list decides whether you need GA4.

I am not a lawyer, and this is not advice for your country. Read the rules that apply to your audience.

Start with questions you can answer

A small site usually needs a few numbers.

Which pages get visits. Where those visits come from. Whether people reach the page with the form.

If the homepage is busy and the contact page is empty, the contact link may be hard to find. If an article brings traffic, that article needs a next step.

You do not need an ads account to answer those.

Google Analytics has a cost besides the account

GA4 stores a client identifier in the visitor’s browser. That is a cookie. Optional analytics cookies are a common reason a small site needs a consent prompt.

If you add GA, plan for the cookie banner. Reject has to stop the tag. A bar that only says Accept still loads gtag.

Name the tool in the privacy policy. A copied template that lists Google Analytics is wrong if you never installed it. It is also wrong if you did install it and the page never says so.

If you run Google Ads and need those audiences, keep GA. The ads stack expects it. For a brochure, a waiting list, or a freelance site, that extra machinery is usually unused.

Cookieless pageviews cover the usual questions

You can count visits without writing a cookie.

Sitebase’s analytics hashes a visitor from IP, user agent, and a salt that changes every day. Nothing is stored in the browser. The same person counts once per day. Yesterday’s hash cannot be joined to today’s.

It still records that someone visited a page. Put that in the privacy notice. You do not need a consent banner for this tracker alone. You still need one if the same page loads Google Ads, a pixel, or another optional script.

Sitebase is in private beta. Public signup isn’t open.

The site snippet looks like this. Replace YOUR_SITE_KEY with the website key from your dashboard:

<script
  async
  crossorigin="anonymous"
  src="https://sitebase.dev/embed.js"
  data-sitebase-site="YOUR_SITE_KEY"
></script>

Put it in the shared layout so every public page loads it. A page that already embeds a Sitebase form reports pageviews through that embed. You still want the site snippet on pages that have no form.

Client-side navigations count as pageviews. You do not add your own pushState listener for that.

The report shows unique visitors, pageviews, bounce rate, visit duration, top pages, sources, countries, devices, browsers, and operating systems. Ranges are 7 days, 30 days, and a longer view. Starter stops at 6 months of daily totals. Per-visit detail is kept for 6 months on every plan.

Do not check this on localhost. The tracker ignores localhost and file: pages. Open the published URL.

Keep GA only if you will use it

Open the published site. Search the HTML and the network panel for googletagmanager or gtag.

If it is not there, you do not need a Google Analytics property. Count pages another way.

If it is there and you do not run ads, remove it. If the banner existed only for that tag, you can remove the banner too.

If you already buy Google Ads, keep GA and gate the tag until analytics consent is given.

<script
  type="text/plain"
  data-sb-consent="analytics"
  src="https://www.googletagmanager.com/gtag/js?id=G-4N8K2P1H7Q"
></script>

type="text/plain" stops the browser from running it. After someone accepts analytics, the runtime turns it into a real script.

When you later need a named click, track a custom event. Then complete the other checks in the launch checklist.