
Integrate Google Analytics: Instructions for your website
.png)
.webp)

The most important facts in a nutshell






If you run a website today, regardless of whether it's a blog, a company homepage or an online shop, then you certainly want to know who is visiting your site, what visitors are doing there and whether your content really works. With data like this, optimizations could be implemented much faster and more specifically. Fortunately, there is Google Analytics, one of the most powerful tools for analyzing user behavior and interactions on your website.
What data does Google Analytics provide?
Google Analytics gives you comprehensive insight into the behavior of your visitors. For example, you'll see:
- How many people are viewing your pages
- How long do they stay there
- Whether they jump off again
- Which devices, browsers and screen sizes they use
- Where they come from (e.g. Google search, social media, direct input)
- Which content works particularly well
- Which paths they take on your site
- And what actions they take (purchases, requests, downloads)
This information is the basis for improving your content based on data, defining new goals or measuring the success of your online marketing campaigns. Especially for small companies, start-ups or self-employed people, these are crucial functions for sustainable growth.
Integrate Google Analytics: step-by-step guide for beginners
Would you like to know how to set up Google Analytics (GA4) correctly without missing anything important? No problem! The following step-by-step instructions will help you to integrate the tool correctly. The entire process consists of five central steps, which we will now go through individually:
Step 0: Understand the structure of Google Analytics: Accounts, Properties & Data Streams
Before you start using the tool, you should understand the basic structure of Google Analytics. The system is based on a clear hierarchical model that was developed specifically for managing complex websites, apps and projects. The following is an overview of the most important terms in this context:
- Analytics account: Your ultimate administrative unit, where you create an account for your company or project.
- Property: Each property stands for a specific website, app, or platform. Your analytics data is collected here.
- Data stream: The flow of data from your system (e.g. website or app) to Google Analytics. You can set up multiple streams per property.
You can also manage multiple analytics accounts under your Google login. This is particularly useful if you work for different customers, departments or brands.
Step 1: Create an Analytics account (if you haven't already done so)
First, create your Google Analytics account. This account is your central administration interface, which you can also use to manage multiple websites, apps or subdomains in the future.
Here's how it works:
- Go to analytics.google.com.
- Sign in with your Google account (or create one if needed)
- Click on the “Create account” button.
- Give your account a meaningful name, such as “Muster GmbH.”
- Choose whether you want to activate recommended data approvals (such as technical support info).
- Click “Next.”
Our tip at this point: Use an account name that remains useful in the long term, especially if you want to analyze several websites and projects later on. Each of your accounts can ultimately contain several properties (web projects).
Step 2: Create a property and data stream (if you haven't already done so)
After creating your account, you continue with the GA4 property. This is the place where all tracking data from your site is collected and evaluated.
- Give your property ID a name, such as “Main Page 2025.”
- Set the time zone (e.g. “(GMT+ 01:00) Berlin”) and currency.
- Select which industry you work in, this will help Google optimize standard reports.
- Activate the planned types of use: “Analyze data about website activity,” “Measure performance,” etc.
- Click “Create.”
You will then be asked to select a data stream:
- Web for classic websites
- Android/ iOS for mobile apps
- Web & app combined if you want to analyze both systems
Since you will most likely want to integrate Google Analytics on a website on your desktop for the first time, you choose the “Web” type. There you enter:
- Your website URL (e.g. www.yourcompany.de)
- The name of the stream (such as “Website Tracking 2025”)
- Optional: Advanced settings (advanced measurement functions such as scroll depth, clicks, downloads, etc.)
At the end, you will receive your individual measurement ID (e.g. G-ABC123XYZ), the new version of the classic tracking ID from Universal Analytics.
Step 3: Find a tracking ID or measurement ID
With Google Analytics 4, there is no longer a classic “UA Tracking ID,” as with Universal Analytics. Instead, GA4 works with a measurement ID. You can find these directly in the created data stream (e.g. G-A1B2C3D4E5). You need this ID for all further steps, as it technically connects your website to your analytics account and reliably forwards tracking data to Google. If you manage several pages, be sure to create a separate GA4 property with a unique ID for each domain.
Step 4: Include tracking code (HTML, CMS, plugin)
Now you need to insert the actual analytics tracking code on your website so that the actual data transfer starts. There are different ways to do this, depending on how you've built your website.
Option 1: Manual integration via HTML
Ideal for classic HTML pages or individually developed projects:
- Go to your GA4 property in Google Analytics.
- Call up the data stream.
- Scroll down to “Tagging instructions.”
- Click on “Global Site Tag (gtag.js).”
- Copy the full code snippet.
- <head>Open your website's HTML code and paste the snippet into the <head>section (right after the opening tag).
- Save, upload, done!
The advantage: You don't need any additional tools. However, changes to tracking (e.g. new events) are only possible manually in this case.
Option 2: WordPress plugin
WordPress is one of the most widely used content management systems, which makes it particularly easy to integrate Google Analytics 4 with the help of a plugin. Recommended plugins include:
- Site Kit by Google, the official Google plugin
- GA Google Analytics: lean and functional
- MonsterInsights: extensive, but chargeable in the Pro version
And this is how it works:
- Install the plugin on the WordPress dashboard.
- Activate it and go to settings.
- Insert your measurement ID
- If necessary, select additional options (IP anonymization, event tracking).
- Save and you're done.
In this case, you don't need to interfere with the code and many plugins even offer you simple visualizations directly in the WordPress backend.
Option 3: CMS or modular system
Are you using a modular system such as Wix, Jimdo, IONOS, Shopify or Squarespace? Here, too, you can integrate Google Analytics without any programming knowledge. The process:
- Log into your provider platform.
- Go to website settings.
- Search for the Tracking, Statistics, or Analytics section.
- Insert your GA4 measurement ID
- Save and publish.
Some providers even offer you a real-time preview to verify the integration.
Step 5: Validate the integration
You can easily test whether everything is set up correctly:
Method 1: Real time report in GA4
- Open your Google Analytics account.
- Go to Reports > Realtime.
- At the same time, open your website in a new tab.
- Now you should see an active user (i.e. yourself) within a few seconds.
Method 2: Google Tag Assistant
- Install the Tag Assistant Chrome extension.
- Go to your website
- The assistant shows you whether and which Google Tags are active.
- You can view errors or warnings directly there.
Method 3: DebugView in Google Analytics
- Activate debug mode in the data stream.
- Use the Chrome browser and developer tools.
- GA4 now shows you in the “DebugView” area whether and which events are being transferred.
If you see activity here, your Google Analytics tracking code is correctly integrated and your system starts collecting data. However, it may take a few hours before the first standardized reports are available.
Integrate Google Analytics via Google Tag Manager (alternative method)
If you want to use more than just a Google Analytics tracking code on your website, such as Facebook Pixel, LinkedIn Insights, or Google Ads Conversion Codes, then you should take a closer look at Google Tag Manager (GTM for short). This tool is a kind of control center for all your tracking codes. Here you can use a clear interface to determine which code is triggered on which page or during which action (e.g. click, scroll, form entry). This has a number of advantages:
- You no longer have to interfere with the HTML code.
- Changes can be made at any time via the GTM dashboard.
- You can set up advanced tracking options (such as scroll tracking, video events, email link clicks, etc.).
- Perfect solution for online shops with multiple events.
- Central administration for agencies or companies with multiple websites.
Setting up Google Analytics 4 with GTM: Here's how
You can easily set up Google Analytics 4 (GA4) via Google Tag Manager (GTM).
Step 1: Create a Google Tag Manager account
- Go to tagmanager.google.com.
- Sign in with your Google account
- Click “Create an account.”
- Give your GTM account a name (such as “My Business Name”)
- Select your platform: “Web” (not app).
- Confirm the terms of use.
- <body>You will receive a container code consisting of two snippets: one goes into the one, one <head>right after the one that opens it.
You must then add these snippets to your website, depending on how you manage the site (WordPress, HTML, shop system, etc.).
Step 2: Create Google Analytics 4 days
- In GTM, go to Tags > New.
- Select “Google Analytics: GA4 configuration tag” as the tag type.
- Enter your measurement ID (such as G-XXXXXXXXX)
- If necessary, activate “IP anonymization.”
- For trigger: select “All Pages.”
- Save and publish a tag.
Congratulations: You've now set up Google Analytics 4 via Google Tag Manager.
And if you want to go one step further, you can also define additional event tags, for example for clicks on buttons, downloads or submitting a contact form. In this way, you can really personalize the use of analytics and adapt it to your company.
Test & debug via Tag Assistant
Before you put your setup live, you should also put everything through its paces when integrating via GTM. This is where Google Tag Assistant comes in handy:
- In GTM, click Preview.
- Enter your website URL.
- The Assistant tag opens in a new tab and shows you:
- Which tags are triggered
- Which analytics property is addressed
- Whether there are mistakes or conflicts
With this tool, you can see at a glance whether your setup is correct and can therefore identify tracking problems at an early stage.
Set up Google Analytics 4: GDPR, cookie banners and legal notices
Before you simply add the analytics code to your site, you should take a moment to think about the legal basis. Germany, Austria and Switzerland in particular have strict data protection rules. Using Google Analytics is therefore only allowed in the EU if you comply with certain data protection measures. This applies in particular to:
- Anonymizing IP addresses
- Obtaining active consent via a consent management tool
- The correct statement in your privacy policy
- Transparent communication about the purpose of data processing
Without consent, data collection by Google Analytics is even illegal. This means: The tracking code may only be activated when your visitor has expressly said “yes” via the cookie banner.
Optional cookies: Consent tools for legally compliant tracking
The following tools help you with GDPR-compliant use with a cookie banner and thus block Google Analytics tracking codes from loading until the user actively agrees. This puts you on the safe side from a legal point of view.
- Borlabs Cookie (WordPress plugin, paid but strong)
- Cookiebot (freely scalable according to number of visitors)
- Usercentrics (for larger websites and online shops)
Use Google Analytics in compliance with data protection regulations
In addition to cookie consent, you should also consider other aspects. These include:
- Reduce the data storage period to what is necessary.
- Don't send any personal information (such as email addresses) to Google.
- Deactivate the use of data for advertising purposes, unless explicitly permitted.
- Activate the “Google Signals” function only with active consent.
Especially for online shops or sites with high traffic figures, it also makes sense to seek legal advice, particularly with regard to ranking losses, warnings or data breaches.
Google Analytics: How to use the information sensibly
The biggest strength of Google Analytics is that it not only provides you with raw data, but also provides you with valuable insights for the development of your website. You can see which call-to-actions are working well, which landing pages might need to be optimized, or where you have technical errors. Typical deployment scenarios include:
- You notice that many users are leaving a specific product page → so you optimize the content, the tracking code, or the loading time.
- You can see that your blog post about “recipe ideas for summer” is getting a lot of traffic → so add more posts on this topic.
- You can see that visitors come from Facebook but hardly trigger any conversions → You're specifically checking your Google Ads or landing pages.
With this combination of data model, user behavior and recommendations for action, you are often one step ahead of your competition.
Conclusion: Integrating Google Analytics made easy
Regardless of whether you run a simple landing page or manage an extensive online shop: Only those who know what's happening on their own website can optimize, fix errors and improve performance. And that is exactly what Google Analytics makes possible. By including analytics codes, whether manually, via plugin or via Google Tag Manager, you get valuable insights into the behavior of your visitors. You'll find out which content is convincing, where users jump off and which pages perform particularly well. These analysis results are worth their weight in gold because they enable you to no longer act on gut feeling, but with clear data, measurable goals and well-founded decisions. It is also particularly helpful that the new GA4 version no longer only tracks page views, but every relevant action, whether scrolling, clicking, submitting a form or completing a purchase. This allows you to better recognize what really counts and refine your content, structure and marketing strategy bit by bit.
Of course, it is also important to keep an eye on the legal framework. Website operators in the EU must absolutely comply with data protection regulations. This includes a correct consent banner, the anonymization of IP addresses and a transparent notice in the privacy policy. Only then is tracking legally safe.
Would you like to get started right away, but don't know where?
We are happy to support you from the technical integration of Google Analytics to complete monitoring and take care of the correct configuration, individual reports and, if you wish, also interpret your data. With clear answers and recommendations, of course, on how to make your website even more successful in the long term.
FAQ: Integrate common questions about Google Analytics
Below you will find answers to the most common questions about integrating Google Analytics.
Do I need to create a new account if I switch from Universal Analytics to GA4?
Yes, you need a new Google Analytics 4 property, as GA4 is technically very different from Universal Analytics. The analytics account remains there, but GA4 uses a new data model with events instead of sessions. It is therefore not possible to transfer data from UA, so you restart with GA4, but with better tracking options and more flexibility.
How quickly can I see data after installing Google Analytics?
You can usually see initial data within just a few minutes via the real-time report. For full reports, you usually have to wait around 24 to 48 hours. You can also use tools such as the Google Tag Assistant or the DebugView in GA4 to check. This way, you can be sure that your tracking code is working and is sending data correctly.
Can Google Analytics be used in compliance with GDPR?
Yes, but only with active consent from a consent tool such as Cookiebot or Borlabs. In addition, you must anonymize IP addresses, provide an adapted privacy policy and, if necessary, conclude an order processing contract with Google. The responsibility for the correct or GDPR-compliant use of your website lies solely with you as the operator.
Is GA4 better than Universal Analytics?
GA4 brings you modern tracking that is better suited to today's Internet usage. Instead of page views, all actions are now recorded as events, which gives you more control over user behavior. GA4 is also more flexible, privacy-friendly and easier to connect with tools such as Google Ads. This version is therefore the more reliable tool for long-term success.
.webp)

Then now is the right time! Together we will turn your website into your strongest sales channel - with a clear strategy and measurable growth.
Get free adviceAre you ready for rocket growth?
Arrange your personal consultation now and find out how we can help you get ahead in search engine marketing. Whether you run a small company or are responsible for a large corporation - we will find the right solution for you.