Follow
Lucid Gen
  • Marketing
    • Facebook
    • Google
    • Zalo
    • Content marketing
    • Email Marketing
    • Marketing tools
    • SEO
  • Website
    • WordPress
  • Technology
    • Computer
    • Phone
No Result
View All Result
Lucid Gen
  • Marketing
    • Facebook
    • Google
    • Zalo
    • Content marketing
    • Email Marketing
    • Marketing tools
    • SEO
  • Website
    • WordPress
  • Technology
    • Computer
    • Phone
No Result
View All Result
No Result
View All Result
Lucid Gen

Lucid Gen › Website › WordPress › How to add Google Analytics to website (Universal and GA4)

How to add Google Analytics to website (Universal and GA4)

Đánh giá bài viết
05/08/2021
0
Cách thêm Google Analytics vào mọi website - How to add Google Analytics to website

Cách thêm Google Analytics vào mọi website - How to add Google Analytics to website

172
SHARES
17.1k
VIEWS
Share to Facebook

Adding Google Analytics to website is a must for most webmasters. Google Analytics has been increasingly improved, from interface to measurement features in the new version is Google Analytics 4. This article, Lucid Gen will guide both versions and make sure you can add Google Analytics to website with any platform on the most popular platforms in Vietnam, such as WordPress, LadiPage, and Haravan.

Related posts

  • How to set up Contact Form 7 tracking
  • How to disable theme and plugin update notification WordPress
  • How to add Adsense Auto Ads and Sticky Ads to AMP
Table of contents
  1. A Quick Intro to Google Analytics
  2. How to generate and get Google Analytics code mã
    1. Create a Google Analytics account
    2. Get the Google Analytics GA4 code
    3. Get the Google Analytics Universal code
  3. How to Add Google Analytics to WordPress Website
  4. How to add Google Analytics LadiPage website
  5. How to add Google Analytics to Haravan Website
  6. How to add Google Analytics to any website
  7. How to add Google Analytics to website with Tag Manager
    1. For Google Analytics GA4
    2. For Google Analytics Universal
  8. How to check if Google Analytics is working
    1. Check Google Analytics GA4
    2. Check Google Analytics Universal
  9. Epilogue

A Quick Intro to Google Analytics

Google Analytics is the forefather of measurement and statistics tools for websites. And since Google Ads was born, Google Analytics has become a great assistant for conversion measurement and generating volume files for remarketing.

The usual metrics we will be interested in are as follows:

  • View
  • User
  • Page loading speed
  • Page viewing time
  • …

More advanced metrics you need to measure events to see:

  • Event
  • Target
  • Behavioral flow
  • …

But this article I only focus on showing you how to add Google Analytics to Website. For more details about measurement in Analytics, perhaps I have to do another article because it is vibrant.

The two new and old versions of Google Analytics have the following differences in the names of the ID and Tag IDs:

  • New version: Measurement code ID, measurement tag code.
  • Old version: Tracking code ID, tracking tag code.

Now, let’s start adding Google Analytics to your website.

How to generate and get Google Analytics code mã

The first thing we need to do is get the Google Analytics code; if you have never created a Google Analytics account, please see the instructions below.

Create a Google Analytics account

Actually, your Gmail account is your Analytics account. Unless you don’t have Gmail, create it. Use your Gmail and start following the instructions.

Step 1: Go to analytics.google.com and click the Start button.

How to add Google Analytics to website - Go to Google Analytics page and click Get Started
Go to the Google Analytics page and click Get Started

Step 2: You enter an arbitrary Account Name and then click Next.

How to add Google Analytics to website - Enter an arbitrary Account Name and then click Next
Enter an arbitrary Account Name and then click Next

Step 3: You enter an arbitrary attribute name, select your time zone and currency. Then you click the Next button.

How to add Google Analytics to website - Enter an arbitrary Attribute Name, select your time zone and currency. Then you click the Next button
Enter an arbitrary Attribute Name, select your time zone and currency. Then you click the Next button

Step 3: You select the Industry Category and Business Size suitable for your website and then click Create.

How to add Google Analytics to website - Select the Industry Category and Business Size that is appropriate for your website and click Create
Select the Industry Category and Business Size that is appropriate for your website and click Create

Step 4: You tick the 2 boxes of terms and click the I accept button.

How to add Google Analytics to website - Check the 2 terms boxes and click the I accept button
Tick ​​the 2 boxes of terms and click the I accept button

After completing this step, you will be transferred to the management interface inside. Please do the below to get the Google Analytics code.

Get the Google Analytics GA4 code

Step 1: You go to Administration (settings icon) and then click on Data Flow of the property. Then you choose Web.

How to add Google Analytics to website GA4 - Click on Data Flow and then select Web
Click Data Streams and then select Web

Step 2: You enter the website domain name in the website URL and enter the optional Stream Name. Then you click Create Stream.

How to add Google Analytics to website GA4 - Fill in the information and click Create Flow
Fill in the information and then click Create Stream

Step 3: This is the data stream you just created. Click on it to get the measurement tag code.

How to add Google Analytics to website GA4 - Select the data stream you just created
Select the data stream you just created

Step 4: You copy the Measurement Tag Code or the Measurement ID ID, depending on how you add Google Analytics to Website as follows:

  • Measurement Tag Code: To add Google Analytics to WordPress Website, any website.
  • Measurement ID: To add Google Analytics to LadiPage, Haravan provider’s Website, or add to Google Tag Manager.
How to add Google Analytics to website GA4 - Get new version Google Analytics code
Get the new version of Google Analytics code

Get the Google Analytics Universal code

Currently, Google still allows you to create Google Analytics Universal. I personally and many others also prefer the Universal version because there are more metrics and more synchronization. To create Google Analytics Universal, when adding a new property, click Show advanced options > enable Create a Universal Analytics property.

How to create Google Analytics Universal
How to create Google Analytics Universal

Step 1: You go to Admin and click on the Tracking Code of the Property you created for your website.

How to add Google Analytics to website Universal - Click Tracking Code in the properties section
Click Tracking Code in the properties section

Step 2: You copy the Tracking Tag Code or the Tracking Code ID depending on how you add Google Analytics to Website as follows:

  • Tracking tag code To install Google Analytics in WordPress Website, hand code website.
  • Tracking code ID: To install Google Analytics on LadiPage, Haravan provider’s web, or add to Google Tag Manager.
How to add Google Analytics to website Universal - Get the old version Google Analytics code
Get old version Google Analytics code

If you have the Google Analytics code, select the corresponding instructions from your website provider to continue installing the Google Analytics code on the web.

How to Add Google Analytics to WordPress Website

You should not insert the code into the theme’s file because you will lose Google Analytics if you update the theme (unless you use a child theme). Use a simple plugin to add Google Analytics to WordPress Website following this tutorial.https://en.wordpress.org/plugins/insert-headers-and-footers/

Step 1: Go to your WordPress Website admin to install the Insert Headers and Footers plugin as follows.

How to add Google Analytics to WordPress website - Add Insert Headers and Footers plugin
Cài plugin Insert Headers and Footers

Step 2: Go to Settings and then Insert Headers and Footers. Then you paste the Measure Tag (Tracking Tag) snippet in the Body or Footer section to reduce the impact on the page load speed.

How to Add Google Analytics to WordPress Website
How to Add Google Analytics to WordPress Website

How to add Google Analytics LadiPage website

To add Google Analytics to Website of LadiPage, go to its designer. Then you click Setup and select Conversion Code. Finally, paste your Measurement ID (Tracking ID) into the Google Analytics ID box and then Publish.

Note: We recommend inserting this way so that LadiPage sends more event data and gives you better conversions. Many of you like to add the Measurement Tag Code (Tracking Tag Code) to the javascript/CSS Code section, which only measures page views and basic data, not events and conversions.

How to add Google Analytics to website of LadiPage
How to add Google Analytics to website of LadiPage

How to add Google Analytics to Haravan Website

To add Google Analytics to Website of Haravan, you must use an account that has permission to edit the website section. You click Website and select Configuration on the left menu. You then paste the measurement ID (Tracking ID) into the Google Analytics section and click Save.

How to add Google Analytics to Website of Haravan
How to add Google Analytics to Website of Haravan

How to add Google Analytics to any website

For a hand-coded website, you need to find the correct file that will appear in all subpages, such as header, footer, or body. You can insert the Measurement Tag Code (Tracking Tag Code) according to this rule.

Note: Only insert 1 time. You choose 1 of 2 ways below.

<head>
Mã thẻ đo lường (Mã thẻ theo dõi)
</head>
<body>
Mã thẻ đo lường (Mã thẻ theo dõi)
</body>

How to add Google Analytics to website with Tag Manager

If you have already added Google Tag Manager to your website, follow these instructions to add Google Analytics to your website through Google Tag Manager.

Step 1: Go to tagmanager.google.com and select the correct container added to your website. Then, click Tags in the left menu column and then click the New button to add a tag.

Add Google Analytics to website with Tag Manager - Click Tags on the menu then click New
Click Tags on the menu, then click New

Step 2: Card settings window appears; click Select trigger below.

Add Google Analytics to website with Tag Manager - Click on trigger
Click on trigger

Step 3: Select All Pages.

Add Google Analytics to website with Tag Manager - Select All Pages
Select All Pages

Step 4: After completing the activation conditions, click Choose card type above.

Add Google Analytics to website with Tag Manager - Click Choose card type
Click Choose card type

For Google Analytics GA4

Step 5: You choose Google Analytics: Configure GA4.

Add Google Analytics to website with Tag Manager - Select Google Analytics: Configure GA4
Select Google Analytics: Configure GA4

Step 6: You paste the measurement code ID into the card. Then, enter a name for the tag you want and click Save.

Add Google Analytics GA4 to website with Tag Manager
Add Google Analytics GA4 to website with Tag Manager

For Google Analytics Universal

Step 5: You choose Google Analytics: Universal Analytics.

Add Google Analytics to website with Tag Manager - Choose Google Analytics: Universal Analytics
Choose Google Analytics: Universal Analytics

Step 6: You tick Enable override settings in this card and then paste the tracking code ID in. Then, enter a name for the tag you want and click Save.

How to add Google Analytics Univeral to Tag Manager
How to add Google Analytics Univeral to Tag Manager

Step 7: After creating the Google Analytics tag in Tag Manager, click the Submit button outside.

Don't forget to click the Send button
Don’t forget to click the Send button

Step 8: You do not need to fill in anything; click Publish, and you’re done.

Click the Publish button
Click the Publish button

How to check if Google Analytics is working

Check Google Analytics GA4

In the new version of Google Analytics, you click Real-time on the left menu column. As long as the charts have jumping numbers, you have successfully added Google Analytics to your website.

How to check if Google Analytics is working - Check out the new version of Google Analytics
Check out the new version of Google Analytics

Check Google Analytics Universal

In the old version of Google Analytics, you click Real-time and select Overview on the left menu column. Just a chart or Right now, there is a jump, and you have successfully added Google Analytics to Website.

How to check if Google Analytics is working - Check Google Analytics Old Version
Check Google Analytics Old Version

Epilogue

After adding Google Analytics to Website, you can add users to Google Analytics for your employees or agencies. In addition, if you are interested in website measurement, please see the articles in this category.

Whether you have successfully installed Google Analytics on your website or not, please leave a comment below. I will reply to help you do it. Good luck with your installation!

Đánh giá bài viết
Share68Pin16Share12Share
Trần Ngọc Minh Hiếu

Trần Ngọc Minh Hiếu

I am currently working as a Data Analyst; before that, I worked in Digital Marketing. Blogging is a joy, helping me share my knowledge and experiences from life and work.

Leave a Reply Cancel reply

I will review and reply to all comments within the day. Please feel free to leave your comments on this article!

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

Recommend for you

  • Trending
  • Latest
Cách gộp nhiều file Excel & CSV thành 1 sheet

How to merge multiple Excel CSV files into one

06/08/2021
4
Cách cài đặt trọn bộ Adobe cho Mac vĩnh viễn - How to download Adobe on Mac for free for life

How to download Adobe on Mac for free for life

28/02/2023
151
Hướng dẫn tracking chuyển đổi MGID chính xác - How to set up MGID conversion tracking

How to set up MGID conversion tracking

06/08/2021
0
Cách cài mail công ty vào Outlook trên điện thoại và máy tính - How to set up domain email in Outlook

How to set up domain email in Outlook

05/08/2021
1
Cách tạo tài khoản ChatGPT và OpenAI chi tiết - How to create a ChatGPT (OpenAI) account

How to create a ChatGPT (OpenAI) account

16/01/2023
4
Download Navicat Premium for Mac free for life - Tải Navicat Premium cho Mac miễn phí

Download Navicat Premium for Mac free for life

14/02/2023
2
How to create Service Account and enable Google Cloud API - Cách tạo Service Account và bật API Google Cloud

How to create Service Account and enable Google Cloud API

08/01/2023
0
How to run a Python file in CMD or Terminal - Cách chạy file Python trên CMD và Mac

How to run a Python file in CMD or Terminal

20/11/2022
0

Lucid Gen

A blog sharing about digital marketing, miscellaneous about technology and what you might need that the author knows.

Developed by blogger
Minh Hieu › Donate

254 Posts and 233 Comments

Disclosure: This website has advertisements. If you don’t have money, how can you write?

 Google Play Microsoft Store

Recent Comments

  • Steve on How to download Adobe on Mac for free for life
  • Vincent Nguyen on How to download Adobe on Mac for free for life
  • Cristina on How to download Adobe on Mac for free for life
  • Jinx on How to download Adobe on Mac for free for life
  • Josse on How to download Adobe on Mac for free for life

Image sources

Lucid Gen edits images from the following sources: Freepik, Unsplash & Pixabay.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

  • About
  • Contact
  • Terms and policies

© 2019 Lucid Gen with by Tran Ngoc Minh Hieu DMCAProtected

No Result
View All Result
  • Marketing
    • Facebook
    • Google
    • Zalo
    • Content marketing
    • Email Marketing
    • Marketing tools
    • SEO
  • Website
    • WordPress
  • Technology
    • Computer
    • Phone

© 2019 Lucid Gen with by Tran Ngoc Minh Hieu DMCAProtected

Click to Copy