GTM: how to set up useful tracking

A container passes four clear events forward, with one highlighted as the most important.

How to set up Google Tag Manager with GA4, choose 3–4 conversions that actually matter, handle consent, and test that measurement is working.

Anabel Hafstad5 min
In this article

It is easy to feel overwhelmed when you open GA4 and see hundreds of numbers without knowing which ones actually matter. Google Tag Manager lets you gather your tracking in one place, and a useful setup simply comes down to measuring three to four actions that prove your website is bringing in customers.

This is part 1 of two. In part 2, I look at why tracking still goes wrong and how to find the root cause.

What is Google Tag Manager?

Google Tag Manager, often abbreviated to GTM, is a free tool from Google. You install a single code snippet on your website, a container. You can then add GA4, ad platforms, and custom events in GTM without your developer needing to edit code every time.

Three concepts are all you need to know:

  • Tags are what gets sent, for example a GA4 event.
  • Triggers determine when the tag fires, for example when a form is submitted.
  • Variables are information the tag needs, such as which page the user is on.

If you don't already have GA4 set up, the GA4 guide is a good place to start.

How do you install Google Tag Manager?

Create an account and a container at tagmanager.google.com. You will receive two code snippets: one for <head> and one immediately after <body>. Many CMSs have a dedicated field or plugin for this, so you don't have to edit template code yourself.

Install GA4 as a Google tag in GTM using your measurement ID. At the same time, remove any old GA4 code placed directly on the website. If both remain in place, visits are counted twice, one of the most common mistakes I see.

Which conversions should you track?

When I set up tracking for clients, I don't start in the tool. I ask what happens when someone becomes a customer. For a tradesperson, it might be a phone call. For a consultant, a form submission. For an online shop, a purchase.

Choose three to four such actions:

  1. Form submission, measured when the thank-you page loads or the form is actually sent, not when the button is clicked.
  2. Clicks on telephone numbers or email addresses, which show clear intent even if you can't see the phone call itself.
  3. Clicks on a key call-to-action button, such as "Book appointment" or "Request a quote".
  4. Purchases or bookings, ideally with a monetary value, if your site supports transactions.

Mark these as key events in GA4. This gives you reports showing which channels and pages drive actual results, not just traffic. Read more about how to approach your conversion rate.

Many events enter, but only four clear ones pass through, with one highlighted.
Pick a few events tied directly to customers. The rest is noise.

In Norway, the Electronic Communications Act (ekomloven) has required consent before non-essential cookies are stored or read since 1 January 2025. Analytics and advertising are generally classed as non-essential. Nkom oversees compliance with these rules.

In practice, you need a consent solution that asks visitors before any tracking that stores cookies is fired. Many solutions integrate directly with GTM.

Google provides its own Consent Mode. Tags receive user choices through signals such as analytics_storage and ad_storage. With Basic Consent Mode, tags only fire once the user has agreed. With Advanced Consent Mode, Google can send cookieless pings before consent is granted. You should clarify which approach suits your business with whoever handles data privacy for you.

How do you test that your GTM setup works?

Click Preview in GTM. This opens your website with a debug panel showing which tags fire on each user action. Submit the form, click the phone number, and verify that the correct tag triggers, exactly once.

Test both consent choices. Decline consent and verify that analytics tags do not store cookies. Accept consent and verify that events arrive in GA4 under DebugView or in the Realtime report.

Before publishing the container

  • Old GA4 code has been removed from the site.
  • 3–4 conversions are set up and marked as key events.
  • The consent solution is connected to GTM and tested with both accept and reject.
  • Each event fires once, not twice.
  • Changes are documented in the GTM version notes.

In part 2 on tracking errors, I walk through what most commonly goes wrong afterwards.

What I often see go wrong with GTM setup

  • GA4 is installed twice. Both directly in the code and via GTM, so every number doubles.
  • Everything is tracked, nothing is used. Twenty events without a plan give noise, not insight.
  • Consent is connected but never tested. It is only noticed when the numbers suddenly drop.
  • No one remembers who has access. Old agencies and former employees are still in there as administrators.

In short: My tip for GTM setup

A good GTM setup is small and boring. I would rather have four events I trust than forty I have to doubt.

Open your container today, look at which tags are actually in use, and delete what you cannot explain.

Anabel, founder of SmåSeo

Anabel Hafstad

Independent SEO and GEO advisor

Do you know which enquiries your website generates?

I can help you choose what is worth measuring and verify the setup alongside your developer. Book a free intro chat.

Read more about how we start →

Or test your website first: Run a free SEO analysis →

Further reading (for the especially interested)

Sources used in this article

Documentation checked 27 October 2026. This article does not constitute legal advice. Check your consent solution against applicable regulations and your own business requirements.

Ofte stilte spørsmål

  • Google Tag Manager is a free tool for adding and managing tracking codes on your website from one place, without changing the code every time.