---
title: "How to Install Google Analytics 4 on Your Website"
description: "How to install Google Analytics 4: create a property and data stream, add the tag to your site or via your CMS, and make sure data reaches your reports."
url: "https://it-deweloper.pl/en/blog/install-google-analytics-4"
date: "2026-10-17T23:40:13+00:00"
language: "en-GB"
---

[Skip to main content](#tm-main)

- [ Home](https://it-deweloper.pl/en "IT Deweloper web studio home page")
- [Contact](https://it-deweloper.pl/en/contact "Contact the IT Deweloper web studio")
    - [ +48 731 190 041](tel:+48731190041 "Phone")
    - [ office<!---->&#64;<!---->it-deweloper.pl](mailto:office<!---->&#64;<!---->it-deweloper.pl "E-mail")
    - [ Nowogródzka 4A, Białystok, Poland](https://maps.app.goo.gl/BNjvryytwRyv4omA7 "Address")
    - [ WhatsApp](https://wa.me/48731190041 "WhatsApp")
    - [ Telegram](https://t.me/+48731190041 "Telegram")
- [Solutions](https://it-deweloper.pl/en/web "IT Deweloper's web development solutions")
    - [How we workStages of work](https://it-deweloper.pl/en/web/process "Website development stages and timelines")
    - [SEOSearch engine optimization](https://it-deweloper.pl/en/web/seo "SEO promotion: optimization, links, positions in Google")
    - [GEOWebsite promotion in AI](https://it-deweloper.pl/en/web/geo "GEO optimization: website promotion in ChatGPT, Gemini and Perplexity answers")
    - [AIArtificial Intelligence on the website](https://it-deweloper.pl/en/web/ai)
    - [JoomlaWebsite Management System](https://it-deweloper.pl/en/web/joomla "Joomla website development")
    - [GoogleGoogle services setup](https://it-deweloper.pl/en/web/google "Google services setup for your website")
- [Cost](https://it-deweloper.pl/en/cost "Rates and cost of services")
    - [PricingIndicative website development prices](https://it-deweloper.pl/en/cost/pricing "Website development prices")
    - [CalculatorSelf-service online estimate](https://it-deweloper.pl/en/cost/calculator "Calculate your website cost online")
    - [BriefGet an accurate project quote](https://it-deweloper.pl/en/cost/brief "Fill out the website development brief")
- [Portfolio](https://it-deweloper.pl/en/portfolio "Portfolio and examples of our work")
- [About us](https://it-deweloper.pl/en/about "About the founder — Victor Parhimchik")
- [FAQ](https://it-deweloper.pl/en/faq "Frequently asked questions about website development")
- [Blog](https://it-deweloper.pl/en/blog "Articles on website development and promotion")
- [ Русский ](https://it-deweloper.pl/ru/blog/install-google-analytics-4)
- [ Polski ](https://it-deweloper.pl/pl/blog/install-google-analytics-4)
- [ Беларуская ](https://it-deweloper.pl/be/blog/install-google-analytics-4)
- [ English ](https://it-deweloper.pl/en/blog/install-google-analytics-4)

  <a class="uk-search-toggle uk-display-block" href="/" uk-search-icon=""></a>

- <a href="/"> ![](https://it-deweloper.pl/templates/yootheme/assets/images/language.svg)  English  </a>
    - [ Русский ](https://it-deweloper.pl/ru/blog/install-google-analytics-4)
    - [ Polski ](https://it-deweloper.pl/pl/blog/install-google-analytics-4)
    - [ Беларуская ](https://it-deweloper.pl/be/blog/install-google-analytics-4)
    - [ English ](https://it-deweloper.pl/en/blog/install-google-analytics-4)

 [ ![IT-Deweloper](https://it-deweloper.pl/images/Faviocon.svg)![IT-Deweloper](https://it-deweloper.pl/images/Logo-light.svg)](https://it-deweloper.pl/en) [ Menu

 ](#tm-dialog)

- [ Home](https://it-deweloper.pl/en "IT Deweloper web studio home page")
- [Contact](https://it-deweloper.pl/en/contact "Contact the IT Deweloper web studio")
    - [ +48 731 190 041](tel:+48731190041 "Phone")
    - [ office<!---->&#64;<!---->it-deweloper.pl](mailto:office<!---->&#64;<!---->it-deweloper.pl "E-mail")
    - [ Nowogródzka 4A, Białystok, Poland](https://maps.app.goo.gl/BNjvryytwRyv4omA7 "Address")
    - [ WhatsApp](https://wa.me/48731190041 "WhatsApp")
    - [ Telegram](https://t.me/+48731190041 "Telegram")
- [Solutions](https://it-deweloper.pl/en/web "IT Deweloper's web development solutions")
    - [How we workStages of work](https://it-deweloper.pl/en/web/process "Website development stages and timelines")
    - [SEOSearch engine optimization](https://it-deweloper.pl/en/web/seo "SEO promotion: optimization, links, positions in Google")
    - [GEOWebsite promotion in AI](https://it-deweloper.pl/en/web/geo "GEO optimization: website promotion in ChatGPT, Gemini and Perplexity answers")
    - [AIArtificial Intelligence on the website](https://it-deweloper.pl/en/web/ai)
    - [JoomlaWebsite Management System](https://it-deweloper.pl/en/web/joomla "Joomla website development")
    - [GoogleGoogle services setup](https://it-deweloper.pl/en/web/google "Google services setup for your website")
- [Cost](https://it-deweloper.pl/en/cost "Rates and cost of services")
    - [PricingIndicative website development prices](https://it-deweloper.pl/en/cost/pricing "Website development prices")
    - [CalculatorSelf-service online estimate](https://it-deweloper.pl/en/cost/calculator "Calculate your website cost online")
    - [BriefGet an accurate project quote](https://it-deweloper.pl/en/cost/brief "Fill out the website development brief")
- [Portfolio](https://it-deweloper.pl/en/portfolio "Portfolio and examples of our work")
- [About us](https://it-deweloper.pl/en/about "About the founder — Victor Parhimchik")
- [FAQ](https://it-deweloper.pl/en/faq "Frequently asked questions about website development")
- [Blog](https://it-deweloper.pl/en/blog "Articles on website development and promotion")

  [ IT Deweloper Blog ](https://it-deweloper.pl/index.php?option=com_content&view=category&id=29&lang=en-GB "IT Deweloper Blog")

#  How to Install Google Analytics 4 on Your Website

Google Analytics 4 shows how many people visit your site, where they come from and what they do: which pages they open, whether they click buttons, whether they send enquiries. Installation takes about fifteen minutes, but small mistakes at this stage can spoil your statistics for months.

Here’s the installation step by step: create a property and data stream, add the tag to your site in one of three ways, and check that data is actually coming in.

---

![A bar chart with a growth line in a browser window, a step checklist and a question mark — a guide to installing Google Analytics 4](https://it-deweloper.pl/images/blog/install-google-analytics-4-cover-2x.webp)

## Before you start: check whether tracking is already there

A common problem is two tracking codes on one site: a developer added one to the template, and another was added through a plugin or Tag Manager. Then every visit is counted twice. Before installing, open your site, right-click → View page source and search for `gtag` and `G-`. If an ID is already there, find out whose property it is before adding a new one.

## Step 1. Create a property

1. Open [Google Analytics](https://analytics.google.com) with your company account.
2. Go to Admin and click Create → Property. If you don’t have an account yet, you’ll be prompted to create one, and the first property will be set up inside it.
3. Enter the name, reporting time zone and currency. The time zone matters: it decides which day visits are assigned to.
4. Answer the questions about your industry and goals and click Create.

## Step 2. Add a data stream for your site

1. In Admin, under Data collection and modification, open Data streams.
2. Click Add stream → Web.
3. Enter your site URL and a stream name. Leave Enhanced measurement on: it automatically collects scrolls, outbound clicks, site search and file downloads.
4. Click Create stream. The stream details will show an ID in the format `G-XXXXXXXXXX`.

## Step 3. Add the tag to your site

The method depends on how your site is built. Choose one, not all of them.

### Through your CMS settings

Many CMSs and site builders have a field for the Google Analytics ID — in the template, SEO extension or integration settings. Just paste `G-XXXXXXXXXX` there.

### Through Google Tag Manager

If Tag Manager is already on your site or you plan to connect other services, install Analytics through it: create a Google tag with your ID and publish the container. I explained how in the article [on installing Google Tag Manager](https://it-deweloper.pl/en/blog/install-google-tag-manager).

### Code by hand

1. In the stream details, under Google tag, click View tag instructions and choose Install manually.
2. Copy the whole snippet — from the `<!-- Google tag (gtag.js) -->` comment to the closing `</script>`.
3. Paste it immediately after the opening `<head>` tag on every page. Usually that’s one place in the shared template.

## Step 4. Check that data is coming in

1. Open your site in a normal browser window without an ad blocker.
2. In Analytics, open the Realtime report. Your visit should appear within a few minutes.
3. If it doesn’t, wait: according to Google, data collection begins within 30 minutes of installation. If there’s still nothing after half an hour, check that the right ID is on the site and that the cookie banner isn’t preventing the tag from firing.

Standard reports fill in with a delay, sometimes up to 24–48 hours. That’s normal.

**Cookie banner and consent mode.** For visitors from the EU, Google Analytics needs to respect their choice in the cookie banner. If the banner is there but doesn’t pass consent to Google, part of your data will be lost or collected incorrectly. How to check it — in the article [on checking Consent Mode v2](https://it-deweloper.pl/en/blog/check-consent-mode-v2).

## What to set up right after installation

- **Data retention.** By default, detailed data for explorations is kept for 2 months. Under Admin → Data collection and modification → Data retention you can extend it to 14 months.
- **Excluding your own visits.** Staff visits distort the statistics of a small site. Exclude them by defining internal traffic by your office IP address and activating a data filter.
- **Link to Search Console.** Then Analytics shows search queries and pages from organic search. How to add a site to Search Console — in a [separate guide](https://it-deweloper.pl/en/blog/add-website-to-google-search-console).
- **Key events.** Enquiries, calls and purchases need to be marked as key events, otherwise Analytics won’t show which sources bring in customers.

## Common mistakes

- Two tracking codes on the site — visits are doubled.
- The code is added only to the home page, not to the shared template of all pages.
- The property is created on a contractor’s personal account.
- Wrong time zone — visits “move” to the neighbouring day.
- An old Universal Analytics code with a `UA-` ID is installed: that service no longer collects data.

## In short

1. Check the site for old or someone else’s tracking code.
2. Create a property and a web stream, copy the `G-` ID.
3. Install the tag one way: via your CMS, Tag Manager or code in `<head>`.
4. Check your visit in the Realtime report.
5. Extend data retention, exclude your own visits and mark key events.

Installing the tag is half the job: next come events, excluding your own visits and linking to advertising. If you want enquiries and purchases counted correctly from day one, we can [set up Google Analytics 4](https://it-deweloper.pl/en/web/google/ga4) for you.

17 October 2026 | [Victor Parhimchik](https://it-deweloper.pl/index.php?option=com_contact&view=contact&id=1&catid=4) | [IT Deweloper Blog](https://it-deweloper.pl/index.php?option=com_content&view=category&id=29)

 [ ![A database icon in a browser window, a step checklist and a question mark — a guide to first queries on GA4 data in BigQuery](https://it-deweloper.pl/images/blog/ga4-bigquery-first-query-cover.webp)

### How to Write Your First Query on GA4 Data in BigQuery

Once Google Analytics 4 is linked to BigQuery, raw events appear in your warehouse every day: every page view, click and enquiry with all its paramet…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=300:ga4-bigquery-first-query&catid=29&lang=en-GB)

 [ ![A gateway arch with an arrow in a browser window, a step checklist and a question mark — an explanation of how Google tag gateway works](https://it-deweloper.pl/images/blog/how-google-tag-gateway-works-cover.webp)

### How Google Tag Gateway Works and Whether to Turn It On

Google tag gateway is a feature that lets you load Google tags from your own domain instead of Google’s servers. It’s often described as a way to “by…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=299:how-google-tag-gateway-works&catid=29&lang=en-GB)

 [ ![A speed gauge with a needle in a browser window, a step checklist and a question mark — a guide to checking Core Web Vitals](https://it-deweloper.pl/images/blog/check-core-web-vitals-cover.webp)

### How to Check Your Core Web Vitals and Read the Numbers

Core Web Vitals are three metrics Google uses to judge how comfortable a page is to use: how quickly the main content appears, how quickly the page r…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=298:check-core-web-vitals&catid=29&lang=en-GB)

 [ ![An envelope in a browser window, a step checklist and a question mark — a guide to setting up SPF, DKIM and DMARC for Google Workspace](https://it-deweloper.pl/images/blog/google-workspace-spf-dkim-dmarc-cover.webp)

### How to Set Up SPF, DKIM and DMARC for Google Workspace

If emails from your domain land in spam or don’t arrive at all, the first thing to check is three DNS records: SPF, DKIM and DMARC. Since 2024, Gmail…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=297:google-workspace-spf-dkim-dmarc&catid=29&lang=en-GB)

 [ ![A shield with a padlock in a browser window, a step checklist and a question mark — a guide to choosing reCAPTCHA and getting keys](https://it-deweloper.pl/images/blog/choose-recaptcha-version-cover.webp)

### How to Choose reCAPTCHA for a Form and Get the Keys

reCAPTCHA protects your website forms from spam bots. During 2025, Google moved all reCAPTCHA keys to Google Cloud, so many older guides are out of d…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=296:choose-recaptcha-version&catid=29&lang=en-GB)

 [ ![A map pin in a browser window, a step checklist and a question mark — a guide to embedding a Google map on a website](https://it-deweloper.pl/images/blog/embed-google-map-on-website-cover.webp)

### How to Embed a Google Map on Your Website Without an API Key

A map on your Contact page helps customers see where you are and get directions straight away. You don’t need an API key or a payment card in Google…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=295:embed-google-map-on-website&catid=29&lang=en-GB)

 [ ![A target with an arrow in a browser window, a step checklist and a question mark — a guide to checking Google Ads conversions](https://it-deweloper.pl/images/blog/check-google-ads-conversions-cover.webp)

### How to Check That Google Ads Conversions Are Tracked

Google Ads learns from conversions: enquiries, calls, purchases. If they’re counted wrongly, the system optimises your campaigns blind — spending bud…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=294:check-google-ads-conversions&catid=29&lang=en-GB)

 [ ![Pie and bar charts in a browser window, a step checklist and a question mark — a guide to building a Data Studio report](https://it-deweloper.pl/images/blog/data-studio-first-report-cover.webp)

### How to Build a Data Studio Report from Analytics and GSC

Data Studio is Google’s free tool for reports and dashboards. In April 2026 Google brought back this name; for several years before that it was calle…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=293:data-studio-first-report&catid=29&lang=en-GB)

 [ ![A cookie icon in a browser window, a step checklist and a question mark — a guide to checking Google Consent Mode](https://it-deweloper.pl/images/blog/check-consent-mode-v2-cover.webp)

### How to Check If Consent Mode v2 Works on Your Website

Google Consent Mode v2 passes the choice a visitor made in your cookie banner to Google Analytics and Google Ads. A banner can look perfect and still…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=292:check-consent-mode-v2&catid=29&lang=en-GB)

 [ ![A Tag Manager tag icon in a browser window, a step checklist and a question mark — a guide to installing Google Tag Manager](https://it-deweloper.pl/images/blog/install-google-tag-manager-cover.webp)

### How to Install Google Tag Manager on Your Website

Google Tag Manager is a “box” for all the tracking codes on your site: Google Analytics, Google Ads conversions, social media pixels. You install the…

 ](https://it-deweloper.pl/index.php?option=com_content&view=article&id=291:install-google-tag-manager&catid=29&lang=en-GB)

 [](#)

 [](#)

   ##  Build your website

Find out what your website will cost

 [ Pricing ](https://it-deweloper.pl/index.php?Itemid=262&lang=en-GB)

 ![](https://it-deweloper.pl/media/yootheme/cache/3c/background-square-01-3c44c74f.png?src=images/yootheme/demo/background-square-01.png&thumbnail=900,900,&hash=72c31958)

 ![](https://it-deweloper.pl/media/yootheme/cache/cb/background-square-03-cbb341a0.png?src=images/yootheme/demo/background-square-03.png&thumbnail=600,600,&hash=6e9dde93)

###  [ Contact ](https://it-deweloper.pl/index.php?Itemid=277&lang=en-GB)

Web studio IT Deweloper website development, Poland. 5423493188

 SEOAIAdsWebSMM

### Address

Nowogródzka 4A
 Białystok, 15-490, PL

 [

### Phone

+48 731 190 041

 ](tel:+48731190041)

 [

### Email

This email address is being protected from spambots. You need JavaScript enabled to view it.

 ](mailto:office<!---->&#64;<!---->it-deweloper.pl)

 [

### WhatsApp

 ](https://wa.me/48731190041)

 [

### Telegram

 ](https://t.me/+48731190041)

 Opening hours:

- Monday

    0900–1800
- Tuesday

    0900–1800
- Wednesday

    0900–1800
- Thursday

    0900–1800
- Friday

    0900–1800
- Saturday

    0900–1600
- Sunday

    closed

 ![IT Deweloper](https://it-deweloper.pl/images/Logo.webp)

Web development can be interesting! Our social media, with content about building websites.

- [](https://www.facebook.com/ITdeweloper)
- [](https://www.linkedin.com/company/it-deweloper)
- [](https://t.me/IT_deweloper)
- [](https://www.instagram.com/it_deweloper/)
- [Portfolio](https://it-deweloper.pl/index.php?Itemid=264&lang=en-GB)
- [Contact](https://it-deweloper.pl/index.php?Itemid=277&lang=en-GB)
- [About us](https://it-deweloper.pl/index.php?Itemid=261&lang=en-GB)

**it-deweloper** — a web development studio.
We design and build modern websites and online stores.

© [it-deweloper](https://it-deweloper.pl/en).
All rights reserved.

[Privacy Policy](https://it-deweloper.pl/index.php?Itemid=313&lang=en)
