Let’s start
Once we have our website on the internet, it is important to have statistics that allow us to know how people are interacting with our website. However, sometimes the simple fact of adding Google Analytics to our website can be a real headache. It is common that, despite having correctly installed Google Analytics, we see a message that says : data collection is not active for your website on our Google Analytics account.
If this happens to you, the solution may be easier than you think. It is important to mention that for this solution, we are going to use two plugins that you must have installed and activated on your website:
- Independent Analytics
- WP Headers And Footers
By the end of this article, you will not only have Google Analytics integrated and installed on your WordPress website, but you will have real and live information in your personal Google Analytics account. So let’s learn how to do it !
1. Go to your Google Analytics dashboard
After creating our free Google Analytics account, we will gain access to a dashboard. On the left side, a tab will open, where we will click on the “admin” section.
The “admin” section will create a new dashboard, from where we will again navigate to the left. This time, we will go to “property settings” and select “data streams.”
Now we will see that our site is correctly registered in Google Analytics, but this is usually where problems might start to appear. For example, my site is receiving information, but if you have an error message, this is an initial indication that Google Analytics is not receiving information from our website.
Now you should click on your site, and the following window with the “web stream details” will appear. It is at this point where the problem normally occurs. Even though you may have installed Google Analytics with the in-site WordPress plugin and are sure you followed the steps correctly, there might be a message that says: “Data Collection Is Not Active For Your Website : 8 Easy Steps for WordPress and Google Analytics“, and I know it can be quite frustrating.
But no worries, here is my solution in three more simple steps.
2. Install Google Analytics manually
It sounds a bit intimidating, especially if you’re not a web developer, because we’re going to talk about code! But don’t worry, it’s actually very easy.
In the same “web stream details” window, we’re going to look for the “view tag instructions”.
Now a new window appears and we must select: install manually.
Now you must copy the exact code that Google Analytics proposes you (it starts by: <!– Google tag (gtag.js) –>), this code is unique to your site, and is the way Google Analytics can start to have information about the activity of your website. Remember to copy the all exact code, otherwise, it is not going to work.
This code must be copied into the <header> section of your website. If you are a web developer, maybe this is very easy for you, but if on the contrary, you have never seen a code in your life, you will ask yourself: where should I copy this code?
3. Install WP Headers And Footers plugin
I found this plugin to be an excellent alternative. If you are not a developer and do not want to complicate your life trying to find the code of your site, with this plugin everything will be easier.
Once you install it and activate it on your dashboard, paste the code you retrieved from Google Analytics inside “Scripts in Header”, save changes, and you’re done!
4. install Independent Analytics plugin
Once the Google Analytics code is on your website, everything should work very well. Now, there are many plugin options that allow you to integrate Google Analytics to your WordPress dashboard. However, I liked working with the independent analytics plugin.
I have used it, and honestly, the free version is great. I can see my website traffic by month, week, day. Also, the countries, cities and devices that view my site. Plus other features that I prefer you to discover on your own.
Conclusion
In conclusion, integrating Google Analytics into your WordPress website is essential for understanding user interaction and gathering valuable data. Despite the initial hurdles, such as the frustrating “Data Collection Is Not Active For Your Website” message, the process can be straightforward with the right approach.
By manually installing the Google Analytics code and utilizing helpful plugins like WP Headers And Footers and Independent Analytics, you can ensure accurate data collection and gain insightful analytics. I wrote this explanation, because in the past I had a lot of problems on internet, I never found an easy solution about this subject.
If you found this information useful, share it with your friends or anyone who might be interested. Do not hesitate to contact me for any thoughts or if you need extra advice. If you are considering using WordPress in the future, take some time to read my article about the benefits of using WordPress for your projects.