Google Analytics · Guide

How to Add Google Analytics to Your Website

Installation means giving your platform one identifier. Every route below does the same thing and the differences are cosmetic. What actually matters is checking it worked and not installing it twice, which is the commonest fault we find.

Updated: August 2026
Written by: Andrew Odgers, Managing Director
Reading time: 14 minutes
One task, five routes

The Same Job Everywhere

Whatever your website is built on, installation is the same job. You take one short identifier from your analytics property and give it to the platform. The platform then loads the measurement on every page. That is the whole task. The differences between platforms are about where you type it.

Where the identifier comes from. Your property.

Creating a property and a stream produces it. That is a separate job covered in our setup guide. It should be done first.

What most platforms provide. A field.

A dedicated box for exactly this, requiring no code and no developer. If you are being told to edit a template, check for the built in option first.

Why we publish no code. It dates and it breaks.

Snippets change, platforms revise their interfaces independently and a printed instruction becomes wrong quietly. Every block below describes what a route does and what it costs to get wrong instead.

What takes the actual time. The two blocks at the end.

Confirming it works and confirming it is only there once. Those matter far more than which platform you use.

What we would do before any of it. Look for an existing installation.

On any site more than a year old, assume something is already there until you have checked. Adding a second copy is easier than finding the first, which is why so many sites carry both.

The order below. Squarespace first.

It is the platform we build on, so it leads. Then WordPress, Shopify, Wix and the container route.

Our core build platform

Squarespace

The most straightforward of the four. Squarespace provides a place in its settings for an analytics identifier, so the whole job is finding that field and pasting one short reference into it.

What the platform handles. The loading.

Once the identifier is in place, measurement runs on every page including any added later. Nothing needs repeating when the site grows.

What it does not handle. What to count.

The platform will record visits and nothing about what a result means to your business. Defining that is configuration rather than installation.

The route to avoid. The code injection area.

There is a place for adding arbitrary code. Analytics does not belong there when a proper field exists. Using both is one of the ways sites end up measuring twice.

What we see on inherited sites. Both at once.

An identifier in the settings field and a script pasted into the injection area by a previous supplier. Everything doubles and nobody has noticed.

The check worth doing. Look in both places.

Before adding anything, see whether measurement is already present somewhere on the site. Two minutes, which prevents the problem in block seven.

Where our platform material sits. Our Squarespace work.

Our designer material covers the platform more broadly. This page covers only the measurement side of it.

Where the duplication problem lives

WordPress

WordPress offers more routes than any other platform, which is exactly why it produces more duplication than any other platform. A plugin, a theme setting and a manual addition to the template can all install analytics. A site can easily end up with two or three of them running together.

The usual route. A plugin.

Several exist that do this and we name none of them, since recommendations date and a plugin abandoned by its author becomes a liability. Your developer will have a preference.

The second route. A theme setting.

Many themes include a field for an analytics identifier. Convenient, though it means the measurement leaves with the theme if you ever change it.

The third route. Direct addition.

Adding it to the template files. The most durable and the one requiring somebody who knows what they are doing.

Why this matters most here. Nobody tells anybody.

A designer adds it to the theme, then an agency later installs a plugin. Neither checks what the other did. That is how sites end up measuring everything twice.

What to do before adding it. Look for it.

Check the plugins, check the theme settings and check the template. Then choose one route and remove the others.

The other advantage of choosing one. Somebody can find it.

An identifier in three places is three things to update when the property changes. Whoever inherits your site will find two of them.

Where the shop complicates things

Shopify

Installation itself is straightforward, since the platform provides a route for connecting analytics. The complication is what happens afterwards, because a shop needs more than visit measurement and the platform handles only part of that automatically.

What the platform handles. The basics, plus some sales data.

Visits across the store and a degree of purchase information sent without anybody configuring it. That sounds complete and generally is not.

Why that is a problem. Partial looks finished.

A property receiving some purchase data produces revenue figures immediately, which reads as a working setup while several stages of the buying process go unrecorded.

What tends to be missing. The middle.

Baskets and checkout steps, which are precisely where sales are lost. Our ecommerce guide covers what a complete implementation records.

The other trap. Apps that add measurement.

Store applications sometimes install their own analytics connection. Adding yours on top produces duplication, which for a shop inflates recorded revenue rather than only visits.

The checkout complication. Worth asking about.

How measurement behaves through checkout varies by plan and by how the store is configured. If sales appear in the platform and not in analytics, that boundary is the first place to look rather than the installation itself.

What to check first. What is already connected.

Look at what the store is already sending before adding anything. On an established shop something usually is.

Brief, because the route is straightforward

Wix

Wix provides a marketing and analytics area in its settings where an identifier can be added. The task is the same as everywhere else and there is little platform specific to say about it.

What it handles. Site wide loading.

Once added, measurement runs across the site. New pages are covered without anything further being done.

The one thing to know. Plan dependent.

Some platform features including custom code and certain integrations require particular plans. If you cannot find the option, that is usually why rather than anything being broken.

The duplication risk. Lower.

Fewer routes exist, so fewer ways to install it twice. Not impossible, since a custom code area can hold a second copy.

What we would still check. Previous installations.

An older property from a previous supplier occasionally remains connected, sending data somewhere nobody looks. Worth ruling out.

What that means for comparisons. Pick one and keep it.

A business quoting platform figures one month and analytics figures the next has produced a trend that describes nothing. Choose which is your record and report from that alone.

Where the reporting sits. The same place as everybody.

Some platforms show their own visitor figures alongside. Those count differently and will not match your analytics, which is expected rather than a fault.

A decision rather than a product tour

Google Tag Manager

A tag manager is a container for tracking tools rather than a measurement tool itself. It records nothing. It sits between your website and whatever you want to load, so things can be added or changed without editing the site each time.

What it actually does. Holds and loads.

You install the container once, then everything else goes inside it. Analytics, advertising tracking and anything similar are managed in one place afterwards.

When it is worth the extra layer. Two cases.

A site running several tracking tools. Or one where changes are frequent and a developer is not available for every one. Both are real reasons.

When it is not. A single website with analytics only.

Which is most small businesses. Adding a container to manage one thing is complexity with no return. It also gives you an additional system to understand.

The confusion it causes. People think it measures.

Businesses believe they have analytics because a container is installed. The container is empty of meaning until something is put in it.

The duplication it enables. A specific version.

Analytics loaded through the container and also installed directly on the platform. Extremely common on sites where a container was added later. It doubles everything.

What to decide. One route only.

If you use a container, analytics goes in it and nowhere else. Choose before anybody starts rather than afterwards.

The block that matters most

Do Not Install It Twice

Analytics present twice on a page counts every visit twice. It inflates every figure the property produces, it is extremely common and nothing about the reporting announces it. On inherited accounts we find it regularly, sometimes running for years.

How it happens. Nobody checks.

A designer installs it, an agency arrives later and installs it again because they cannot see the first one. Neither did anything wrong and the result is broken.

How to recognise it. Three signs together.

Visits roughly doubling from a particular date. No matching rise in enquiries. Engagement figures that look implausibly poor, because each visit is being counted as two short ones.

The date is the diagnosis. Almost always.

Find when the inflation started and ask what happened to the website that week. Somebody added something. That is your answer.

Why it matters beyond tidiness. Decisions.

A doubled traffic figure makes a channel or a campaign look twice as effective as it was. Money follows results that did not happen.

What fixing it does. Creates a visible drop.

Figures halve on the day you correct it. That is the correction rather than a decline. Write it down so nobody investigates it later as a crisis.

Where the diagnosis is covered. Troubleshooting.

Why analytics is not tracking data covers this alongside the opposite problem of recording too little.

Practical, skipped by nearly everybody

Check It Is Actually Working

Never assume an installation worked. The commonest reason a business has no data for a period is that somebody added the identifier, closed the tab and never confirmed anything arrived.

The test. Visit your own site.

Open the website, then look at the live reporting shortly afterwards. Your visit should appear within moments.

What to do if it does not. Rule out yourself.

If internal traffic is excluded, your own visit correctly will not show. Test from a mobile connection outside your network before concluding anything is wrong.

What not to be alarmed by. Empty reports on day one.

The fuller reporting takes time to populate. Live confirmation is the test on the first day, rather than an empty summary report.

The second test. An enquiry.

Visits arriving while enquiries go unrecorded is a common and considerably more expensive fault. Send a real enquiry through every route and check each one registered.

When to repeat it. After anything changes.

A redesign, a platform update, a new form or a change of supplier. Ten minutes then prevents months of quiet loss.

What to record. The date it was verified.

A note saying tracking confirmed working on a given date is worth having when somebody later asks whether a quiet period was real.

Factual, kept brief

Consent And What It Changes

What a visitor agrees to affects what can be recorded. That is a fact about your figures rather than a legal matter. It explains why a newly installed property can report fewer visits than a business expected from day one.

What happens when somebody declines. Less arrives.

Depending on the arrangement, a visit may be recorded in limited form or not at all. The visit still happened and your reporting will not fully show it.

Why installation makes this visible. A fresh comparison.

A business installing analytics for the first time compares the figures against its own sense of how busy it is. The gap surprises people.

What changing your banner does. Moves the figures.

Businesses that alter their consent arrangement see counts shift noticeably. That is measurement changing rather than demand. It is worth dating.

What we will not do. Advise on obligations.

Nothing here describes what your consent notice should cover or suggests any configuration to record more than a visitor agreed to. That is a question for somebody qualified to answer it.

Where the wider picture sits. The troubleshooting guide.

It covers why the data is never complete, alongside sampling and the other reasons your figures are a portion rather than a total. Everything sits on the Google Analytics guide.

The commonest fault we find on inherited sites

Installed twice,
counting twice,
for years.

A designer adds it, an agency arrives later and adds it again because they cannot see the first one. Neither did anything wrong. Every figure the property produces is inflated and nothing announces it. A channel that looks twice as effective as it is gets the budget.

What we check on any installation:

Whether it is already there Plugin, theme and template Container and platform both Old properties still connected One route, the rest removed A real visit confirmed live A real enquiry confirmed too The date written down

When you fix duplication the figures halve overnight. That is the correction rather than a collapse. Note it before somebody panics.

The full guide series

Every guide.
One tool.

Getting it installed and configured properly, reading the reports without being misled, measuring outcomes rather than activity, the advanced reporting and what to do when the numbers look wrong.

Questions people ask

Installing It, Briefly

How do I add Google Analytics to my website?
By giving your platform one identifier from your analytics property. Most platforms have a field built in for exactly this, so nothing needs editing by hand. The differences between platforms are about where that field sits rather than about what the task is.
Do I need a developer to install it?
Usually not. On the main website platforms this is a settings field a business owner can fill in. A developer becomes useful where a site has been customised, where several tracking tools are involved or where something has already gone wrong.
Where does the tracking code go?
On most platforms it does not go anywhere, because there is a dedicated field for the identifier instead. If you find yourself being told to paste code into a template, check whether your platform has a built in option first, since that is safer and easier to undo.
Do I need Google Tag Manager?
Most small businesses do not. It earns its place on sites running several tracking tools. Or where changes are frequent and a developer is not available for each one. For a single website with analytics and nothing else it is an extra layer for no benefit.
How do I know if analytics is installed twice?
Look for visits roughly doubling from a particular date with no matching rise in enquiries. Look also for engagement figures that appear implausibly poor. Duplication is common on sites where a plugin, a theme setting and a manual addition are all doing the same job.
Does it start working straight away?
Live reporting usually shows a visit within moments, so you can confirm it immediately. The fuller reports take longer to populate, which means an empty report on the first afternoon is not evidence of a problem. Check the live view rather than waiting.