HOW TO ADD GOOGLE ANALYTICS TO WORDPRESS

      23

If you are new khổng lồ the world of blogging, or just realized the need for trang web 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 địa chỉ Google Analytics to 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, & other key metrics of a business.

How to địa chỉ cửa hàng Google Analytics lớn a WordPress trang web Without Plugin

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

Method 1: Integrate Google Analytics và WordPress Manually with Code (Don’t worry you only need khổng lồ copy-paste the code)

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

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

Step 3: Enter the details of your property

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

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

Step 6: Locate header.php on the right side of the dashboard to lớn copy & 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 account (FREE)

Signing up for web analytics is pretty easy và is free of cost. Just go to lớn https://analytics.google.com/, & click mix up for free.


*

Step 2: Choose the type of property such as website or ứng dụng

địa chỉ cửa hàng an tài khoản name of your website và make sure to kiểm tra all the data sharing options, and Click Next.

Step 3: Enter the details of your property

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

This will help you generate reports according to your time zone and currency, which can help you take rightful business decisions.


*

Now Click on “Show advanced options”, in order khổng lồ set up the Universal Analytics Property for your website.

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

web 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 website analytics for you to lớn improve your business.

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


*

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

Xem thêm: Cách Đăng Xuất Tài Khoản Outlook Trên Máy Tính Và Thiết Bị Di Động Đơn Giản Nhất

You can choose what applies khổng lồ your business và Click Create to add a new property in Google Analytics.


*

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

In the next window, you will see the tracking code and the tracking ID for your Analytics account as shown below in the screenshot.


*

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

We are just a few steps away from tracking our google analytics data in WordPress. As soon as you go to your WordPress dashboard, Click on Appearance in the left menu, & go to 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 to edit the parent theme click on “Select theme to lớn edit:” , right above where it shows the theme files.

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


Now web analytics has been added to lớn your WordPress website. You will be able to lớn see data in the web analytics dashboard usually after 48 hours.


Method 2: địa chỉ Google Analytics to WordPress with Google Tag Manager

Before we try to add Google Analytics to your WordPress trang web using Google Tag Manager. You have to 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 khổng lồ be pasted after the tag & before the tag. Ideally, you should be pasting it right after the tag.

Step 4: xuất hiện the Google Tag Manager & 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 trang web name.

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

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

Select Web as your target platform và Click Create.