If you are new to lớn the world of blogging, or just realized the need for website analytics, then you are in the right place.

Bạn đang xem: How to add google analytics to wordpress

This guide not only covers how to showroom Google Analytics to lớn the WordPress site but would also help you sign up for Google Analytics.

Website analytics is an important part of knowing the audience of your website. With the help of traffic stats, you can easily improve traffic, sales, và other key metrics of a business.

How to showroom Google Analytics to a WordPress website Without Plugin

There are various methods to showroom Google Analytics lớn a WordPress website. But I found the following 2 khổng lồ be the easiest and quick for beginners.

Method 1: Integrate Google Analytics & WordPress Manually with Code (Don’t worry you only need to copy-paste the code)

Step 1: Sign up for a Google Analytics trương mục (FREE)

Step 2: Choose the type of property such as website or app

Step 3: Enter the details of your property

Step 4: Get the tracking code from the google analytics dashboard

Step 5: Go lớn the WordPress dashboard, và go to lớn Appearance –>Theme Editor

Step 6: Locate header.php on the right side of the dashboard khổng lồ copy và paste the code. (If your child theme is inheriting data from a parent theme you will not see header.php)

Step 1: Sign up for a Google Analytics tài khoản (FREE)

Signing up for web analytics is pretty easy and is không tính tiền of cost. Just go lớn https://analytics.google.com/, và click mix up for free.


*

Step 2: Choose the type of property such as website or app

Add an trương mục name of your website and make sure to kiểm tra all the data sharing options, & Click Next.

Step 3: Enter the details of your property

In this step, you have to again địa chỉ cửa hàng the name of your trang web as the Property name, Reporting time, and the currency your business operates in.

This will help you generate reports according lớn your time zone và currency, which can help you take rightful business decisions.


*

Now Click on “Show advanced options”, in order to lớn set up the Universal Analytics Property for your website.

If you are going lớn skip this step, Google will automatically install the new GA-4 version on your website. (this is not yet recommended due lớn complications in installing và data collection).

Google Analytics 4 is a new version of Analytics by Google. This is backed by AI-powered insights & provides more granular data i.e. More detailed trang web analytics for you khổng lồ improve your business.

Now in the advanced options, type your website URL & select Create a Universal Analytics property only, as shown below, and click Next.


*

In the next window, you will have the option lớn select a few more things related to your business. This includes Industry, Business size, và how are you planning to lớn use google analytics with your business.

Xem thêm: Top 20 Shop Quần Áo Gần Đây : Thời Trang Nam, Nữ, Trẻ Em Đẹp Rẻ Nhất Hiện Nay

You can choose what applies to lớn your business và Click Create to địa chỉ a new property in Google Analytics.


*

Step 4: Get the tracking code from the google analytics dashboard

In the next window, you will see the tracking code và the tracking ID for your Analytics trương mục as shown below in the screenshot.


*

Step 5: Go lớn the WordPress dashboard, và go to Appearance>Theme Editor

We are just a few steps away from tracking our web analytics data in WordPress. As soon as you go lớn your WordPress dashboard, Click on Appearance in the left menu, and go to lớn the Theme Editor.

Step 6: Locate header.php in the right side of the dashboard.

In the Theme Files thực đơn displaying on the right side of the dashboard, Click on the Theme Header.

If your child theme is inheriting data from a parent theme you will not see header.php. In order lớn edit the parent theme click on “Select theme to edit:”, right above where it shows the theme files.

Now locate, on the main screen và Paste the copied script from the previous step, and Click Update File.


Now web analytics has been added khổng lồ your WordPress website. You will be able khổng lồ see data in the google analytics dashboard usually after 48 hours.


Method 2: showroom Google Analytics lớn WordPress with Google Tag Manager

Before we try to add Google Analytics lớn your WordPress website using Google Tag Manager. You have lớn make sure that you have signed up for Google Analytics, and have completed the above steps.

Step 1: Sign up for Google Tag Manager (Accept the service agreement)

Step 2: Copy the code to install Google Tag Manager on your website

Step 3: The first code needs lớn be pasted after the tag và before the tag. Ideally, you should be pasting it right after the tag.

Step 4: Open the Google Tag Manager and hover to lớn the main screen

Step 5: Click on địa chỉ cửa hàng a new tag. In the new window phối a name for your tag such as your website name.

Step 6: Configure the Tag & Trigger in GTM for adding google analytics to a website.

Step 1: Sign up for Google Tag Manager (Accept the service agreement)

Select Web as your target platform and Click Create.