If you want to see how your WordPress website is performing and the behavior of your website visitor then this article is for you. In this article I will be explaining you how to setup Google Analytics 4 (GA4) in Your WordPress Website.
What is Google Analytics?
Google Analytics is a very simple tool which help us to know everything that is happening on our website, It helps us to know that what is happening on our website like how the website is performing, how much visitor are coming to website, from where they are coming, etc.
It helps us know the performance of our website so that we can take more effort on our website to make it a great website.
Setup Google Analytics 4 (GA4) in Your WordPress Website. Step by step guide.
What is Google Analytics 4 (GA4) ID?
Google Analytics 4 is a newest and greatest version of Google Analytics launched by Google in October 2020.
According to Google, Google Analytics 4 will provide more smarter insights as compare to old version. They also hopes that Google Analytics 4 will provides the insight about eCommerce also, and will help to take better marketing decision.
According to Google, GA4 is design for:
- Smarter Insight.
- Deeper integration with Google Ads.
- Customer-centric data measurement.
- More data control.
Let’s see how to install Google Analytics 4 (GA4) IN WordPress.
How to Install Google Analytics 4 (GA4) in WordPress.
We will Install Google Analytics 4 (GA4) in two steps. Let’s start.
- Create an account on Google Analytics.
- Connect GA4 account with WordPress website.
How to create account on Google Analytics?
1. Go to analytics.google.com and click on ‘use it for free’ then sign in to google analytics with your google account.
2. Fill up your detail like account name in ‘account details’ section an click on “Next”. In ‘Property Setup’ you have to fill Property Name, Reporting Time Zone, and Currency. Then click on ‘next’.
3. Give your business detail in ‘About Your Business’ section and click on Create.
4. Now Google Analytics will show you the terms of service agreement, accept the terms of service agreement and click on ‘I Accept’.
You have successfully created your account and you can see your account’s dashboard. It would look like this.
5. Click on web and fill up your information like your web address and website name, then click on “create stream”.
Now you will see the following webpage. The highlighted component is your measurement ID. Just scroll down and you will see an option “global site tag(gtag.js)”. Click on that and you will get a code snippet.
Connecting Google Analytics account with WordPress website?
To connect Analytics account with your website you have two method, these are:-
- By installing the code on your WordPress website with the help of ‘Insert Headers and Footers’ plugin.
- By deploying a Google Tag Manager container on wordpress.
Connecting Google Analytics 4 (GA4) by installing the code on your WordPress website with the help of ‘Insert Headers and Footers’ plugin.
Now go to Google Analytics dashboard Just scroll down and you will see an option “global site tag(gtag.js)”. Click on that and you will see a code snippet. It contains your measurement ID which you have to past in your WordPress ‘Header and Footer’ plugin. Copy that code and move to your WordPress dashboard.
In WordPress dashboard, under settings click on “Insert Headers and Footers”.
Now paste your code in “Script in Header” section, scroll down and click on “Save” to save your changes.
You have successfully installed the Google Analytics 4 property in your WordPress after some hours you will start getting your website’s insight and real time data. Great job.
With the help of Google Tag Manager.
You can also connect Google Analytics 4 (GA4) with the help of Google Tag Manager. Click here to know how to integrate Google Tag Manager in WordPress.
To connect Google Analytics GA4 Configuration with help of GTM, go to GTM dashboard and click on “New Tag”.
Write your container name, click on ‘Choose a tag type to begin set-up’ and choose “Google Analytics: GA4 configuration”.
Now go Google analytics and copy your measurement ID and paste it in Google Tag Manager.
Now you have to click on “Choose a Trigger to Make This Tag Fire”, choose “All pages”. After this click on “Save” to save your container.
Congratulation you have successfully created the google analytics 4 container in GTM now your container is ready to publish.
you’ll have to submit your newly created tag. To do that, select Tags from the options on your left. Then select the tag which you have created and click the Submit button.
You need to write your version name and version description in “Submit Changes” page and click on “Publish” to deploy your container.
You have successfully installed the Google Analytics 4 property in your WordPress with the help of GTM after some hours you will start getting your website’s insight and real time data.
If you have any problem ask me by comment.
You can also tweet your problem on Twitter and tag us. We will help you personally and will embed your tweet here below the article. Our Twitter handle is @realtechandbio.
You may also like.