How To Add Google Analytics to WordPress: A Step-by-Step Guide (2023)

The first step you need to take after building your WordPress website is to add or set up Google Analytics WordPress so that you can avail yourself of the tracking services. These services include reporting the traffic to the website, user behavior, and other such metrics.

Google Analytics is a popular website tracking tool available on the internet. Even if you don’t intend to sell anything through your website, it is still important to know about your viewers and their behavior.

Why Add Google Analytics To WordPress?

Everyone may have a diverse reason for creating their websites, but the number of visitors to your website matters a lot. Irrespective of the fact whether you have created a personal blog, or an online store, the understanding of your visitors holds the utmost importance and Google analytics gives you the same.

Knowing the fact that where the viewers or your WordPress website/blog/online store belong and what their preferences are will help you a lot. You can enhance the content on your website as per their behavior over the website.

The best thing about Google Analytics is its price. It’s free of cost, all you need to do is to implement it on your website and start getting the results. The data that you can derive from Google Analytics include:

  • The number of pages visitors have viewed on your website.
  • Your viewers can either be directed to your website from search results from various search engines, some social networking pages, any referred website, traffic from your paid marketing campaign, email campaign, or any direct traffic. Google Analytics helps in tracking all these sources of traffic.
  • It also helps in tracking the number of visitors viewing your website.
  • It helps in determining the number of visitors who view your website and leave it immediately. The bounce rate metrics in google analytics help you to identify if the traffic is relevant to your content or not.
  • The duration an individual has stayed on your website and on which page.

All this data can help you analyze and evaluate the performance of your website and the ways you can increase traffic.
Let’s have a look at the ways How to connect google analytics to WordPress sites but before that, you need to know how to sign up for Google Analytics.


Signup For Google Analytics

  • Sign up for Google Analytics by creating an account on the Google Analytics sign-up page using your existing Gmail account or creating a new account.
  • Alternatively, create a business email and sign up with it on Google Analytics.
  • Choose the website option for setting up Google Analytics.
  • Enter the required information such as the URL of your WordPress site and click on the “Get Tracking ID” button.
  • Thoroughly read the Analytics terms and services and accept them to complete the sign-up process.

How to install Google Analytics on WordPress

Installing or Adding Google Analytics to WordPress can be done easily by following two main methods:

Method 1: Adding the tracking code Manually

Method 2: Using a plugin

1- Adding Directly With Tracking Code

You can add Google Analytics to the WordPress site by following the method explained below.

Note: This method requires some sound expertise and knowledge to implement.

  • Copy the tracking code.
  • Log in to the WordPress site. In the “Appearance” menu, click on “Editor”.
  • Search for the template file named “header.php” in the list of templates.
  • Search for the tag </head> and paste the previous tracking code before the “</head>” tag.

*You can use CTRL + F keys to search for the template file and tag for your convenience.

  • “Update File” after you have pasted the code.
  • The next step is to go to the place from where you copied the code and refresh the screen. It makes sure that the tracking code is placed properly and data is being received from your account.

2- Adding it with a WordPress Plugin

You can add google analytics to WordPress websites using WordPress Plugins also. These plugins are mostly free but if you wish to use their add-on features, you may need to upgrade your plugin to their premium plans [ Which is mostly not required]

So, in this section, we shall be talking about 4 Different WordPress plugins that you can use to Add Google Analytics to the WordPress website for monitoring purposes. They are.

  • Google Analytics by Mosterinsights.
  • Google Analytics by Share This.
  • Google Analytics Dashboard for WP (GADWP)
  • 10WebAnalytics
  • Analytify

There is a variety of plugins available to add Google Analytics to the WordPress website you own, let’s take the example of the MonsterInsights Plugin and know the steps to add Google Analytics to your website through this plugin.

  • Upload and activate the Google Analytics by MonsterInsights plugin.
  • Click on the “Analytics” menu and go to “Settings”

1. Google Site Kit

Google Site Kit

Google Site Kit is an Official WordPress plugin from Google that integrates your website with Google services like Analytics, Search Console, AdSense, and PageSpeed Insights. It’s user-friendly and displays all your website’s Google insights in one place, making it a convenient tool to use.

Here’s a step-by-step guide to using Google Site Kit :

  • Install the Google Site Kit plugin (like any other WordPress plugin from WordPress Directory) on your WordPress website.
  • Connect your Google account to Site Kit by following the on-screen instructions.
  • Once connected, select which Google services you want to integrate with your website (e.g. Google Analytics, Search Console, AdSense, etc.).
  • Grant Site Kit access to your Google accounts for the services you’ve selected.
  • Once the services are connected, Site Kit will display various metrics and data points related to your website’s performance across these services.
  • You can access this data by logging into your WordPress dashboard and navigating to the Site Kit section.
  • From there, you can view detailed insights about your website’s traffic sources, popular pages, search queries, and more.
  • You can also customize your Site Kit settings, view reports, and access other Google tools, all within the WordPress dashboard.

Google Site Kit has several advantages, including easy integration with various Google services like Analytics, Search Console, AdSense, and PageSpeed Insights, a user-friendly interface, an easy setup process, and displaying all your website’s Google insights in one place.

Additionally, Site Kit doesn’t pressure you to connect more services and doesn’t slow your loading times.

However, one downside is that it may be overkill if you only plan on connecting one Google service. Also, Site Kit doesn’t provide configuration options for the services you connect, which may be confusing for first-time users who need to visit each service individually to customize their setups.

2. Google Analytics for WordPress by MonsterInsights

All in One Migration

There are two ways to connect the Google Analytics account to the plugin. You can either manually enter the user account code or authenticate it with your Google account. Read on to understand both methods.

Manually Entering the Code

  • Check the “Manually enter UA code” box and go back to your account.
  • Navigate to the main menu and click on the “Admin” link.
  • Under the “Property” column, go to “Property Settings”.
  • You will find the code under “Tracking ID”, copy that code and paste it into the field in the plugin.
  • Click on the “Save Changes” button.

*You may need to wait for at least 1-2 minutes before it finally starts tracking data for your website.

Authenticate With Your Google Account

The process of adding Google Analytics to your WordPress website is rather simple, you just need to follow the given instructions.

  • Sign in to your Google Analytics account.
  • Click on “Authenticate with your Google Account”.
  • Follow the instructions given and go through the prompts.

Using Google Analytics for WordPress by MonsterInsights has a significant advantage as it’s persistent and will save your tracking data even if you change the template or theme of your website.

However, one downside is that you need to download a plugin specifically to add Google Analytics to your WordPress site. Overall, the advantages of using this method outweigh the disadvantages, making it a worthwhile option for tracking your website’s performance.

Now that you have connected your website with Google Analytics, you can safely track the data of your visitors and make use of this extensive feature to increase your viewership and earn more.


3. Google Analytics By ShareThis

Google Analytics from ShareThis

Google Analytics from ShareThis is the plugin to add GA tracking code to your website without modifying any files. You can also disable tracking for specific users. It allows you to see the analytics reports on the same interface you already use every day to write and manage your posts – in your WordPress dashboard.

Now let’s take the example of the Google Analytics plugin by ShareThis and know the steps to add Google Analytics to your website through this plugin.

  • Upload and activate Google Analytics by ShareThis or you can also install Google Analytics via the wordpress.org plugin repository.
  • Navigate to Google Analytics in the WordPress sidebar.
  • Authenticate via Google, copy and paste the access code, and choose your property from the dropdown. You can also add the web property ID from Google Analytics manually but dashboards won’t show up in this case.
  • When any of your content takes off you will see the URLs inside the Trending Content section

4. Google Analytics Dashboard for WP (GADWP)

Google Analytics Dashboard for WP

This plugin allows you to track your site using the latest Google Analytics tracking code. It also provides in-depth page reports, and in-depth post reports in addition to general Google Analytics stats which allow further segmentation of your analytics data, providing performance details for each post or page from your website.

Another plugin for Google Analytics is Google Analytics Dashboard for WP (GADWP). The steps to add Google Analytics to your website through this plugin are:

  • Upload and activate the Google Analytics Dashboard for WP or you can also install Google Analytics Dashboard for WP via the wordpress.org plugin repository.
  • Open the plugin configuration page, which is located under the Google Analytics menu.
  • Open the general settings page, which is located under the Google Analytics menu.
  • Authorize the plugin to connect to Google Analytics using the Authorize Plugin button.
  • Go back to the general settings page, which is located under the Google Analytics menu to update/set your settings.
  • Go to Google Analytics -> Tracking Code to configure/enable/disable tracking.

5. Google Analytics WD – user-friendly Google Analytics integration plugin

Google Analytics WD

This plugin adds Google Analytics tracking code to your websites and gives all the necessary options to easily customize your code to best fit your requirements. It allows you to check your website Audience, Real-Time statistics, and many more reports. It also allows adding goals to Google Analytics directly from your WordPress site.

Google Analytics WD is another plugin for Google Analytics for your WordPress site. Let’s see the steps to add Google Analytics to your website through this plugin.

  • Upload and activate the plugin using the zip file of the plugin or install it via the wordpress.org plugin repository.
  • After installing Google Analytics WD, Goto Analytics menu and click on the Authenticate button, clicking on which will open a popup window.
  • Now log in to your Google account and copy the given code to the corresponding input in the plugin.

6. Google Analytics Dashboard Plugin for WordPress by Analytify

Analytify

It is simply everywhere in WordPress (Posts, Pages, Custom Posts). It presents the statistics of Google Analytics in its Dashboard and that too in a beautiful manner. Its premium version shows Real-Time Stats, Campaign Stats, shortcodes, Front-end Stats, and more reports in the backend and front end.

Using these plugins, you can add Google Analytics to WordPress websites and make the most out of it.

Analytify is yet another plugin for Google Analytics for your WordPress site. The steps to install and configure this plugin are:

  • Upload and activate the plugin using the zip file of the plugin or install it via the wordpress.org plugin repository.
  • GoTo Analytify -> Settings page
  • Go to “Step 1”, click the “Log in with Google Analytics Account” button
  • Connect and give Analytify App access to your Google Analytics account.
  • After Authentication, Select your Profiles for front/admin Statistics from Settings-> Profile tab.

Verify whether Google Analytics is Working or not

After installing Google Analytics on WordPress, it’s important to verify that it’s properly tracking website data. Here are the steps to do so:

  • Log in to your Google Analytics account.
  • Go to the “Real-Time” view to check if your tracking code is working properly. You should see a “right now” counter that indicates the number of active users on your website.
  • If you don’t see any data, try reloading your website or wait a few minutes and check again.
  • Once you’ve confirmed that real-time data is being tracked, review past data to ensure accuracy.
  • Go to the “Audience” or “Acquisition” sections to review past data. Make sure the numbers make sense and that they align with your website traffic expectations.
  • Check the “Technology” and “Behavior” sections to see if the data accurately reflects user behavior on your website.
  • If you notice any discrepancies or strange data, double-check that the tracking code is installed correctly and that it’s tracking the correct website.
  • If you’re still having issues, refer to Google Analytics documentation or forums for troubleshooting advice.

By following these steps, you can ensure that Google Analytics is tracking your website data correctly and providing you with accurate insights into your website performance.


Advanced Google Analytics Features

Google Analytics offers several advanced features that can help you gain even deeper insights into your website traffic and user behavior. Here are a few key features you can take advantage of:

  • Event Tracking: Track specific user interactions on your website, such as button clicks or video views, to gain more detailed insights into user behavior.
  • Goal Tracking: Set up specific goals, such as completing a purchase or filling out a contact form, to track how often users are completing these actions on your website. Learn more: https://support.google.com/analytics/answer/1032415
  • E-commerce Tracking: Track revenue, transactions, and other e-commerce metrics on your website to better understand your online sales performance. Learn more: https://support.google.com/analytics/answer/1009612
  • Custom Dashboards: Create custom dashboards with the specific metrics and data you want to track, to help you quickly gain insights and make informed decisions. Learn more: https://support.google.com/analytics/answer/1068218
  • Segments: Segment your website traffic by specific attributes, such as geography or behavior, to gain a deeper understanding of user behavior and preferences. Learn more: https://support.google.com/analytics/answer/3123951

To learn more about these advanced features and how to use them, refer to Google Analytics documentation and tutorials. By taking advantage of these features, you can gain even deeper insights into your website traffic and make more informed decisions about your online presence.


How to Make the most out of Google Analytics.

Google Analytics is the eye of your website’s growth. If you are using it effectively, you will always have an answer to why your business is failing or getting success. Some of the important metrics that Google Analytics provides when you add Google Analytics to a WordPress website are also taken into consideration by the Google algorithm to rank your website on top searches.

Consider the following metrics at figure tips to make the most out of Google Analytics.

  • Keep monitoring your organic growth and compare it with the previous period. If the percentage growth shows in reading then probably your rankings are falling for keywords which you were ranking well earlier.
  • Always check your bounce rate. If your bounce rate is poor, it gives you a reason that you have irrelevant traffic or some of your content page is loading slowly.
  • Set up goal tracking. With goal tracking, you can easily judge the conversion funnel that you have created on your website.
  • Check traffic source. With Google Analytics, you can always identify which social media platform or referral websites are working well for you. You can also monitor your email marketing and Google ads paid campaign to identify the effectiveness of your paid ads.
  • Check when your users are online. With time tracking of visitors, you can record the favorable time during which you have maximum users on your website. It is always you to manage your server resources.
  • Identify the devices. With Google Analytics, you can check if desktop, mobile, or iPad users are better audiences or not.
  • Demographics Study. When you add Google Analytics to the WordPress website, you can easily monitor the age group, gender, location, and many more features like these to identify the website visitors’ persona.

Using Google Analytics, you can work towards growing your website to a rising curve. Add Google Analytics to the WordPress website and start seeing real-time traffic behavior.


Conclusion

In this article, we covered how to install Google Analytics on WordPress, including two methods for installation: using a plugin or adding the tracking code manually. We also explained how to verify that Google Analytics is tracking website data correctly, including checking for real-time data and reviewing past data.

Additionally, we introduced several advanced features of Google Analytics, such as event tracking, goal tracking, and e-commerce tracking, and provided resources for users to learn more about these features.

In summary, Google Analytics is an essential tool for tracking website traffic and user behavior. By installing and using Google Analytics on your WordPress site, you can gain valuable insights into your online audience, make informed decisions about your website, and optimize your online presence. We encourage all website owners to start tracking their website traffic and user behavior with Google Analytics.


Frequently Asked Questions

How do I add Google Analytics to WordPress without plugins?

You can add Google Analytics to WordPress with a Tracking Code.
1. Log in to the WordPress site. In the “Appearance” menu, click on “Editor”.
2. Search for the template file named “header.php” in the list of templates.
3. Search for the tag </head> and paste the previous tracking code before the “</head>” tag.
*You can use the CTRL + F keys to search for the template file and tag for your convenience.
4. “Update File” after you have pasted the code.
5. The next step is to go to the place from where you copied the code and refresh the screen. It makes sure that the tracking code is placed properly and that data is being received from your account.

Should I add Google Analytics to WordPress?

Yes, you should add Google Analytics to your WordPress site. Google Analytics is a powerful tool that provides valuable insights into your website traffic and user behavior. With Google Analytics, you can track metrics such as pageviews, bounce rates, user demographics, and much more. This data can help you understand your audience, optimize your website, and make informed decisions about your online presence. By adding Google Analytics to your WordPress site, you’ll be able to gain valuable insights and make data-driven decisions to help your website grow and succeed.

How can I tell if Google Analytics is installed on WordPress?

To ensure that Google Analytics is tracking your website data correctly after installation on WordPress, follow these steps:
1. Log in to your Google Analytics account and go to the “Real-Time” view to check for real-time data.
2. If there’s no data, reload your website or wait a few minutes and check again.
3. Once you confirm real-time data is being tracked, review past data in the “Audience” or “Acquisition” sections.
4. Check the “Technology” and “Behavior” sections to ensure the data accurately reflects user behavior on your website.
5. If you notice discrepancies or strange data, double-check that the tracking code is installed correctly and track the right website.


Leave a Reply

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