SEO – Google Analytics (GA4)

Google Analytics shows what visitors do on your website: how many came, from where, which pages they read and what actions they took. The current version is Google Analytics 4 (GA4). The older Universal Analytics stopped working in 2023, so every new setup uses GA4.

Set up GA4

  1. Sign in to analytics.google.com and create an account and a property for your website.
  2. Create a web data stream with your website address. GA4 gives you a Measurement ID like G-XXXXXXXXXX.
  3. Add the tracking code to every page, before the closing head tag. WordPress users can use a plugin or the theme settings instead.
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-XXXXXXXXXX');
</script>
  1. Open the Realtime report and visit your site. You should see yourself as a user.

Replace G-XXXXXXXXXX with your own Measurement ID. You can also install GA4 through Google Tag Manager.

Privacy and consent

Analytics uses cookies and collects data about visitors. In many countries (for example in the European Union) you need to tell users and ask for consent first. Add a privacy policy and a consent banner as your local law needs.

Important reports for SEO

  • Reports, Acquisition, Traffic acquisition: shows the channels. Look at Organic Search for the traffic from search engines.
  • Engagement, Pages and screens: shows which pages get the most views.
  • Landing pages: the pages where visitors start. You can add a filter for Organic Search to see the best landing pages from SEO.
  • Engagement rate and average engagement time: measure if people interact with your content. GA4 uses these instead of the old bounce rate idea.

Key events (goals)

Mark the actions which are important for you as key events: a form submit, a purchase, a newsletter sign up or a click on a call button. Then you can see which pages and channels bring real results, not only visits.

Link GA4 with Search Console

In the GA4 admin settings, you can link your Search Console property. Then the Search Console reports show inside Analytics, and you can see the queries together with the user behavior.

Things to remember

  • Numbers from Analytics and Search Console will not match exactly. They measure different things.
  • Visits from people who block tracking or refuse cookies are not counted.
  • Exclude your own visits with an internal traffic filter.
Note: Do not look only at the total traffic. Check which pages bring the visitors who do something useful, and make more of those pages. Next: SEO Tools.

Congratulations! Chapter Finished. Learn more about the similar topics:
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.