How to Add Google Analytics in WordPress | 3 exciting ways - TIPsoont

How to Add Google Analytics in WordPress | 3 exciting ways

How to Add Google Analytics in WordPress | 3 exciting ways

3 exciting ways to Add Google Analytics in WordPress, Measurement in business Matters a lot, and the best plugin to analyze your website’s Audience is Google Analytics.

Knowing how users interact with your site is a great way to boost traffic and analyze the traffic source. All you need to do is add Google analytics to WordPress. Of course, you already understand the importance of it, that’s why you are here.

So, without further ado, let’s find out how you can do this effectively and quickly.

How to Add Google Analytics to WordPress?

Setting up Google Analytics in WordPress doesn’t require any specific technical knowledge, and it’s no longer a rocket as the availability of various plugins has created 10x ease in a user’s life.

So, here we discuss all you need to know for it so that you can start getting the benefits of web analytics for your business.

3 Ways to Add Google Analytics in WordPress:

Whenever you think about adding some features to WordPress, the first thing that will pop up is whether it is possible to do with a plugin or whether you have to do it manually, Right? The same goes for adding Google Analytics in WordPress.

Well, here you have both opportunities to add it with the help of a plugin or do it manually – it’s totally up to you. But here we will describe both. Still, we recommend using a plugin because without it; it’s not as easy as it seems. Also, there would be a higher chance that you will get lost and will find it much trickier as it is.

So, let’s discuss step by step and in detail the procedure of adding analytics in WordPress.

1- Adding Google Analytics in WordPress – Using a Plugin:

 So, here is the step guide to adding Google Analytics in WordPress.

Install a plugin (Step 1):

Before getting a tracking code and diving into it technically, we recommend installing and activating a plugin named “WP code insert header and footer”. It would help you to easily add the tracking code as it has 1 million users.

WP code insert header and footer WordPress Plugin

With a simple interface, you could insert code in Google Analytics without editing your themes function .php file.

So, simply stating Wpcode has taken the pain out of custom coding and made it drastically easy.

Logo of Google Analytics
Sign up for Google Analytics (Step 2):

It comes first; if you are a beginner or already don’t have an account, you must sign up for your Google Analytics account.

The process is straightforward. All you need is a google account to use any of the Google services; don’t worry; we will walk you through the process.

  • Open a browser and search for Google Analytics; you need to sign up because you don’t have an account.
  • Once you log in, it will navigate you to the registration page.
  • The account creation process starts here; you will put in all the necessary details by following the instructions.

Just make sure to fill in each criterion to get the tracking code.

Get the Tracking Code (Step 3):

So, here is our step-by-step guide to getting a tracking code.

  1. Once you log in and create your account in Google Analytics, a dashboard will appear.
  2. You need to go to the data stream option (you will find it in the left sidebar).
  3. The following 3 options will appear to you; select one for which you want to generate analytics (i.e. for a website, click on the web).
  4. A page will pop up where you enter the website URL and stream name and click on the creative stream.
  5. Once you click on it, it will take you toward the tracking I’d.
  6. Here you would find the option of Google site tag; click on it (this will be your tracking code)
  7. That’s it! You have got the tracking code.

Now, all you need to do is copy this code and add it to the header or footer section of your .php file. As you are a beginner, we recommend using the above-stated plugin to add code in the header or footer section conveniently.

Don’t forget to save and update the setting. Yes! You are all done with the installation of Google Analytics in WordPress.

2- Adding Google Analytics in WordPress – Manually:

This method is for you if you are some of those people who prefer to make any changes in WordPress manually.

The remaining process will remain the same, and the only thing that will change is adding the tracking code. As you are doing it manually, that’s why you need to paste your code (that you had got using the previous method) in the header.php file.

Theme Editor File In WordPress Header.php
Header.php and Themeeditor files will look like

And to get things done, all you need to do is go to appearance, then theme editor and find the option of header.php in the right sidebar. Here you need to paste your tracking code right before the closing of the heading tag in the header.php file.

Tip: we recommend protecting your site with a child theme before starting this process, as it will preserve all the changes you have made in the parent theme. With that, it’s always a good practice to create a backup as it’s risky to change the theme, and these two will save you from later regret.

3- Bonus – Google Site Kit:

If you are a complete beginner and want to get analytics of your site, Google site kit Plugin is the best ever choice. This plugin is just a lifesaver for starters and will save you the hassle as it will bring the stats inside your dashboard and help you to see the site performance at a glance in a nutshell and in one place.

Google Site kit Foe WordPress website
Google Site kit (All Google base Services in one)

To get the analytics, all you need to do is;

  1. Install the plugin Google Site Kit – a simple yet effective plugin by Google
  2. Activate the plugin and click on the “start setup” button
  3. As expected, here, you have to go through specific steps to prove that you are the actual owner of this domain.
  4. After this, it will redirect you to the dashboard of your site.
  5. Here at the top left sidebar, you will get the option of Google Site Kit.
  6. Just click on it and start getting the ultimate benefits from the data.

This free plugin will get things done in just a few clicks. You will still need other Google services like Google search console to pull data for it.

Final Thoughts:

Undoubtedly, Google Analytics is a robust and free tool that allows you to track your performance and achieve actionable results.

Though there is another method using Google Tag Manager, which is also best, we are here to give you the best possible and most accessible solutions. So, we recommend using tracking code and getting rid of the complexity of Google tag manager.

As we had stated, the ultimate method to add Google Analytics in WordPress; hopefully, you get the answer. Feel free to knock out our contact us page if something is still left unanswered.

Till Next!

Admin
Social Media

YOU MAY ALSO LIKE

1 Comment

  • Δημιουργία δωρεάν λογαριασμού , April 25, 2023

    Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.

Leave a Reply

Your email address will not be published. Required fields are marked *