Install & Setup Google Analytics in WordPress Website For Free Ultimate Tutorial
In this article, see a tutorial on how to set up, integrate & install Google Analytics, a powerful tool to help you with your WordPress site
Understanding how your audience interacts with your website is vital to your growth and success. The best way to know your audience is through free traffic statistics, which Google Analytics offers. Therefore in this article, see a tutorial on how to set up, integrate, and install Google Analytics, a powerful tool to help you with your WordPress site.
Install Google Analytics
First, what you are going to do is create your free Google Analytics account. Then you will be asked to log in with a Gmail account. After doing this, you will be registered.
Select the button that says Start Measuring.
The next screen will prompt you to create an account name. You can track more than one site in an account so that you may use something broad, such as your company name.
Then set the properties. This should include the name of the website, the time zone, and the currency used on his website for this company.
The next screen asks a few questions about your business and your plans to use Google Analytics.
Click on Terms and Conditions and select Email Communication to go to the admin panel.
Next, set up the data flow. When adding Google Analytics to your WordPress site, you need to select “Webstream.”
Next, you will add the URL and the site name.
So after clicking the Create Stream button, you will see the stream name, URL, stream ID, and measurement ID. Add it to your website using your measurement ID.
Adding Google Analytics to your WordPress site
There are three different ways to set up and integrate Google Analytics on any WordPress site.
What’s best for you will depend on your comfort level when making changes to your site’s code.
The first option is a WordPress plugin to install Google Analytics on your website without any coding; see the following tutorial:
1- Using the Google Analytics Plugin
The easiest way to integrate Google Analytics tag code into WordPress is with a plugin.
MonsterInsights’ Google Analytics for WordPress is the most popular and makes it simple to add Google Analytics code to your site.
The free version should work fine unless you need advanced tracking and reporting features. Then you should upgrade to the Pro version.
- Install and enable the MonsterInsights plugin.
- Start the wizard to fill in information about your site and click the Connect MonsterInsights button. This will take you to some configuration pages that should be pre-selected for your setup.
- Next, you’ll be signed into your Gmail account and asked for permission to access your Google account.
- Click Allow, and then you will be shown the Google Analytics account you will be connecting to.
- Click Connection to connect to your Google Analytics account. An upgrade to Pro is provided, but you can complete the installation without upgrading by selecting the link below.
You’re all set up now and will see Insights in your WordPress dashboard. Reports, settings, and other tools you select are now visible in the WordPress dashboard.
The second option involves using a WordPress plugin and copying and pasting a small amount of code.
2 – Using the header/footer script plugin
The second way to install the Google Analytics tag is by using the Header/Footer plugin.
This method is especially useful for tracking metrics that vary from page to page, as it can be used for specific pages or the entire site.
WPCode Insert Headers and Footers + Custom Code Snippet – WordPress Code Manager is the most known plugin for inserting header and footer code, used by more than 1 million users.
- Install a header and footer plugin on your WordPress website.
- In your Google Analytics account, click on Bookmarking Instructions and select the Install Manually tab.
- Copy the code from the Google tag.
- In the WordPress dashboard, you will see the Code Snippets plugin in the left navigation menu.
- Select Header and Footer from the drop-down menu and paste your code into the Header section.
- Click Save.
To upload code to a selected web page or publish, choose the web page or publish and scroll down. Add the relevant Google Analytics code to the header of this page. Finally, click Update to save your changes.
The third option requires editing the code in your site’s theme files.
3 – Add the Google Analytics snippet directly into the Header.php file
If you feel comfortable working now on your theme’s code, this is another option for adding your Google Analytics code. Remember that you are now changing the theme files, so if you change or update your theme, you will lose your Google Analytics code and need to add it again every time you update or change your theme.
- Go to Appearance > Theme File Editor in the WordPress dashboard.
- Select the parent theme and the header.php.
- Copy and paste the code before the closing element.
- Click Update File to save your changes.
Installing the Google Analytics tag allows you to view your dashboards from the Google Analytics website.
Alternatively, if you have selected the MonsterInsight plugin method to install Google Analytics on your WordPress site, you can view the reports and data directly in the WordPress dashboard.
Conclusion on How to Install Google Analytics WordPress
Google Analytics is a tool that helps you understand how your visitors access and use your website, how pages are converting, how many users are visiting your website, and more. Additionally, you can use Google Analytics data to gain valuable information about your website traffic, allowing you to make improvements.
It is worth noting that Google Analytics cannot collect data retrospectively, so it is essential to add Google Analytics to your website as soon as possible to avoid data loss. So, we hope this tutorial on how to set up and install Google Analytics on your WordPress site has helped you. Leave us your comment in the comment area below.