Category: SEO

How to Install Google Analytics on a WordPress Website

Google Analytics is a free, all-in-one tool that lets you track your website traffic and data. Google Analytics tells you how many people visit your website, which individual pages they view, how many conversions you get, and how people interact with your…

How to Install Google Analytics on a WordPress Website

Google Analytics is a free, all-in-one tool that lets you track your website traffic and data.

Google Analytics tells you how many people visit your website, which individual pages they view, how many conversions you get, and how people interact with your content. This data is essential for optimizing your website.

In this article, we will share why Google Analytics matters and how you can easily install Google Analytics on WordPress, step by step.

Let’s explore it together with Tiếp Thị Tử Tế!

1. Why does Google Analytics matter for bloggers?

When you start a blog, your number one goal is to get more traffic and subscribers on your website. Google Analytics helps you make data-driven decisions by showing you key statistics. You can see:

What do people do while they are on your website?

You can track users as they browse your website: how long they stay on your site and what your bounce rate is.

Using this information, you can develop strategies to reduce your bounce rate and increase your pageviews.

You can also see which of your posts are popular, which posts are not performing well, and what type of content your users are looking for.

When do people visit your website?

You will know what time of day you get the most visitors. From there, you can plan to publish new posts at the best time, or set up scheduled publishing.

You can also see how many people are on your site in real time.

How do people find your website?

This part of the analysis tells you where your users come from. For example, whether they used a search engine, typed in your link directly, or clicked a referral link from another website.

It also shows what percentage of your visitors come from each of these sources. Google Analytics gives you a breakdown of each category. For the search engine category, it tells you which search engine brings you the most traffic: Google, Yahoo, Bing, and so on.

The referral sources report tells you which sites you most need to partner with. If your top referral source is Facebook, you need exclusive content on Facebook to make your Facebook audience feel special.

If your top referral source is an external website, you may want to consider partnering with that site.

How do people interact with your content?

Google Analytics shows how your users interact with your website content. It shows you what percentage of users clicked which links on your site, and more.

You can run A/B split tests by creating content experiments in Google Analytics to understand what works best to meet your goals.

By knowing how users engage, you can focus on strategies that suit your website and avoid ineffective ones.

Put simply, take out the guesswork and focus on the statistics that matter, so you can make data-driven decisions.

2. How to install Google Analytics on WordPress

Step 1: Sign up for Google Analytics

Before connecting Google Analytics to your website, you need to have a Google account. We will do that first by going to the Google Analytics homepage: https://analytics.google.com/analytics/web/.

First, go to Google Analytics to sign up.

Then enter your Gmail address and click the Next. If you don’t have a Gmail account yet, you can create one right now by clicking Create account.

How to Install Google Analytics on a WordPress Website - image 1

After signing in to Google Analytics, you will see the screen below.

How to Install Google Analytics on a WordPress Website - image 2

On the next page, you will enter the Google Analytics account details for your website, such as Account name, Website name, Website URL, and so on.…

Note: The website URL is the most important field, so you must enter it exactly. Choose the correct version, http:// or https://, for your website.

Next, fill in the required information as shown in the images below:

How to Install Google Analytics on a WordPress Website - image 3

How to Install Google Analytics on a WordPress Website - image 4

How to Install Google Analytics on a WordPress Website - image 5

How to Install Google Analytics on a WordPress Website - image 6

How to Install Google Analytics on a WordPress Website - image 7

Next, Google will ask whether you agree to its terms. To continue, you must tick the checkboxes, then click the I Accept button at the bottom of the page.

How to Install Google Analytics on a WordPress Website - image 8

Click to choose the Web platform.

How to Install Google Analytics on a WordPress Website - image 9

How to Install Google Analytics on a WordPress Website - image 10

When you are done, you will receive a tracking ID along with a code snippet to add to your website.

How to Install Google Analytics on a WordPress Website - image 11

You will see a tracking code in a rectangular box. You need to copy this code to insert into your WordPress website using the methods we explain below.

Keep this window open and don’t close it, because you will come back to copy the code in the next steps.

Step 2. Learn the basics of Google Analytics

Before learning how to add the tracking code to your website, let’s go over some Google Analytics basics. That way, you will better understand the kinds of information you can find in Google Analytics. You can click the Home button.

How to Install Google Analytics on a WordPress Website - image 12

On the right, you will see statistics for your website. On the left, you can choose which data to view. You will find several different sections that, when clicked, contain other submenus and the following information:

  • Real-time – Shows you what is happening on your website right now: how many visitors are on your site, where they come from, and which links they are viewing.
  • Audience – Contains information that helps you learn more about your users, such as the number of visitors over a period of time, their average time on site, and other information about them.
  • Acquisition – Shows you which sources send users to your website and information about your marketing channels.
  • Behavior – Everything about what your users do after they arrive on your website and the content they view.
  • Conversions – If you have set up goals inside Google Analytics, this is where you see how well you are doing at achieving them.

Step 3: Add Google Analytics to WordPress

For Google Analytics to start tracking visitors, you need to insert the tracking code you received above into your website. In this article, we will show you several ways to insert this code into your WordPress website.

How to add the Google Analytics tracking code to WordPress

Tiếp Thị Tử Tế will show you three different ways to add Google Analytics to any WordPress website.

The best option for you depends on how comfortable you are making changes to your website’s code.

The first option uses a WordPress plugin to add Google Analytics to your website without writing any code.

The second option uses a WordPress plugin with a small amount of code that you need to copy and paste.

The third option requires you to edit the code in your website’s theme files.

1. Use a Google Analytics plugin

The easiest way to add your Google Analytics tag code to WordPress is to use Flatsome.

How to Install Google Analytics on a WordPress Website - image 13

Step 1: Go to your WordPress dashboard and click Flatsome –> advanced.

Step 2: Copy the Google tag code from Google Analytics

How to Install Google Analytics on a WordPress Website - image 14

Step 3: Paste the Google tag code into the header scripts section as shown below:

How to Install Google Analytics on a WordPress Website - image 15

Step 4: Click Save to apply the changes.

Step 5: Check your data by signing in to Google Analytics. If it shows the number of people currently visiting your website, the installation was successful.

How to Install Google Analytics on a WordPress Website - image 16

2. Use the Header and Footer Scripts plugin

Another way to install your Google Analytics tag is to use the Header and Footer Scripts plugin.

This method is especially useful if you want to track different metrics for different pages, because it can be used on specific pages as well as across the entire website.

Insert Headers and Footers by WPCode + Custom Code Snippets – WordPress Code Manager is the most popular plugin for inserting header and footer code, with more than 1 million users.

Step 1: Install the Headers and Footers plugin on your WordPress website.

Click Install –> Activate

How to Install Google Analytics on a WordPress Website - image 17

Step 2: Go to your WordPress dashboard and click Settings –> Header and Footers.

How to Install Google Analytics on a WordPress Website - image 18

Step 3: Copy the Google tag code from Google Analytics.

How to Install Google Analytics on a WordPress Website - image 19

Step 4: In your WordPress dashboard, you will see the Code Snippets plugin in the left navigation menu.

How to Install Google Analytics on a WordPress Website - image 20

Step 5: Select Headers and Footers from the dropdown menu, then paste your code into the Header section.

How to Install Google Analytics on a WordPress Website - image 21

Step 6: Click Save to apply the changes.

Step 7: Check your data by signing in to Google Analytics. If it shows the number of people currently visiting your website, the installation was successful.

3. Add the Google Analytics code directly to the header.php file

If you are comfortable working directly with your theme code, this is another option for adding the Google Analytics code. Keep in mind that you are changing theme files directly. So if you change or update your theme, you will lose the Google Analytics code and will need to add it again every time you update or change the theme.

Step 1: In your WordPress dashboard, go to Appearance –> Theme File Editor.

How to Install Google Analytics on a WordPress Website - image 22

Step 2: Find and click the file header.php in the right-hand column.

How to Install Google Analytics on a WordPress Website - image 23

Step 3: Copy and paste the code right before the closing </head> tag.

How to Install Google Analytics on a WordPress Website - image 24

Step 4: Click Update File to save your changes.

After installing the Google Analytics code, you can sign in to your Google Analytics account to track your website traffic data.

You usually need to wait 24 hours for Google to collect data. Only then will you see traffic data in your Google Analytics account.

Conclusion

We hope you have successfully installed Google Analytics on your website. If you run into any difficulty, leave a comment and Tiếp Thị Tử Tế will help you out!

 

In this article

Related articles

How to Read Google Search Console to See What Your Website Needs to Improve

SEO Case Study: How RTINGS.com Dominates Product Niches

SEO Case Study: 6 Interesting Lessons from Zapier’s SEO Strategy

How to Create a Google Business Profile and Rank Higher on Google Maps

See more

Google Marketing

Uncategorized

Content Marketing

Services

From Annual Goals to Weekly Tasks: How to Fill Out a Marketing Action Plan

A business sets a goal of growing revenue next year, but when it hands the work to the marketing team, the plan…

Furniture and Equipment Landing Page Design: What Helps Customers Ask About the Right Product?

A furniture or equipment business may get plenty of traffic from Google Ads, yet most of the customers who get in touch…

Year-End Google Ads: Choose the Right Products Before You Increase Your Ad Budget

At the end of the year, many businesses face pressure to hit revenue targets while also clearing inventory to prepare for a…