Chủ Nhật, 20 tháng 2, 2022

What is Google Tag Manager? How to use Google Tag Manager 2022

Chances are you've heard of Google Tag Manager (Google Tag Manager) and probably used GTM more or less. But you have not seen the effective effect of Google Tag Manager , right?

After this article you will change your mind! Trust me. After reading this article you will become GTM 's best friend.

Through the article "How to use Google Tag Manager for beginners". You will understand what is Google Tag Manager? How to use GTM and why to use Google Tag Manager?

Let's get started!

What is Google Tag Manager?

Google Tag Manager – Google Tag Manager is a tool set up to solve business problems across departments, track marketing campaigns, manage JavaScript and HTML tags, proactively update websites, …

What is google tag manager?

What is Google Tag Manager concept?

This example is easy for you to understand.

Google Tag Manager is a specific piece of software of the TMS concept – Tag Management System.

In a company, when the marketing department wants to install the Facebook pixel on the website, they will have to propose this idea to the IT department. Usually the IT side - after a rather long process - attaches that pixel to the website.

Doing so for so long! You don't have to wait like that anymore!

Think of GTM as a “dashboard” designed for marketers to accomplish anything related to tracking marketing results.

In 2012, Google announced their own Google Tag Manager and since then Google Tag Manager has been growing steadily both in terms of clients and features.

Imagine that you could see every click that was happening on your website.

With GTM you can do this easily and much more. I will show you how to do it correctly and in detail.

Example of Tracking Code management: Watch the following video to understand more!

User and Conversion Optimization Benefits

  • Support tracking all user behavior on the website quickly

  • The testing feature better understand how effective, real-time website react from here will make appropriate adjustments according to the goal

  • Easily duplicate, re-use templates when needed

  • Free: Here are templates available online

  • Help track both Sub Domain or Cross Domain,…

  • Other benefits such as: security, user management, version management, workspace, ... (just like Google Drive)

Benefits of GTM in SEO

  • Insert the schema into the website (if the theme you do not support) on each page if you want

  • A way to automatically insert schema for the entire page on the website like Yoast SEO plugin if you don't use wordpress

  • Attach user tracking: Helps to understand consumer behavior and from here you can improve related experiences such as content, UX/UI, etc.

Typical tracking example: Watch the following video to understand better!

Difference between GA and GTM

GA and GTM are completely two different things that serve two very different purposes.

GTM allows you to manage various Javascript tracking codes (also known as tags) on your website. The Google Analytics tracking code is one of those tags.

Google Analytics is an analytics tool that provides reports. GTM does not have a reporting feature, it is used to send data from your website to other marketing/analytics tools (including GA).

If you don't want to use Google's tag manager, that's okay. You can still continue to add the Google Analytics tracking code directly to your site's source code (but keep in mind that you, as a marketer/analyst, lose a lot of flexibility).

Eg:

As I said above, Google Analytics itself is a tag. According to the GA guidelines, you need to put the GA tracking code on every page of your website.

The sample tracking code should look like this:

<!-- Global site tag (gtag.js) - Google Analytics -->

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-83848370-1"></script>

<script>

  window.dataLayer = window.dataLayer || [];

  function gtag(){dataLayer.push(arguments);}

  gtag('js', new Date());


  gtag('config', 'UA-XXXXXXX-X');

</script>

GTM will provide a default Google Analytics tag template, so setup is pretty easy. After you install GTM on your website, go to Tags.

  1. Click New

  2. Click on the Tag Configuration block and select the tag template

  3. Paste the Measurement ID of your GA4 data stream

  4. Click on Activation

  5. Select all pages

You just created the Google Analytics pageview tag in GTM. It will track pageviews on all pages that have GTM container snippets installed. All pageviews will be redirected to the Google Analytics property). If you have advanced measurement enabled, GA4 will also automatically track a range of other events.

Limitations of Google Tag Manager

1. You must have some technical knowledge, even for the basic setup

See the documentation from Google on how to set up Google Tag Manager. After you pass the “Quick Start Guide”, you will be taken to a developer guide, not a marketer guide. If you are a first time user, this will be difficult to understand.

2. Invest a lot of time

Unless you are a seasoned developer, you should spend some time researching and testing. Even while reading a few blog posts or taking an online class.

3. Take the time to troubleshoot problems.

There's a lot of troubleshooting going on when setting up tags, triggers, and variables. Especially if you don't use GTM often, it's easy to forget what you just learned. For more complex tags, you will likely need a developer with knowledge of how the site is built.

Are you new to Google Tag Manager and want to learn its uses? Sign up for  the SEO  Online – SEO Fundamental course to master the foundation of this dedicated SEO tool .

trial Seo Fundamental

How to install Google Tag Manager

To install Google Tag Manager you need to follow these steps:

#1: Create a GTM account

Go to https://tagmanager.google.com > Sign in to your Google account > Create a GTM account.

gtm account setup

Step 1: Set up an account

Creating an account is quite quick, you just need to fill in some general information, select the country name and then click "Continue ".

In the account name section you can use any name. However, I recommend using your company name or website name for ease of management.

#2: Create and set up Containers

In the "Container name" section, similar to the account name, you can enter any name for easy tracking.

set up the container

Step 2: Set up the container

Then click " Where to use the container ". In this section you will click where you want to use the container such as web, IOS, AMP, Android.

Next, don't forget to click the "Create " button.

#3: Add the Google Tag Manager code to your website

After clicking on the “ Create ” button, a window will appear showing information about the terms to be able to use Google Tag Manager. There, you don't have to care about them, you just need to click “Yes”.

google gtm terms of service

Agree to terms of service to continue creating GTM

Right after that, a table containing 2 codes of the container you just created will appear.

What is google tag manager - gtm code?

2 codes of the container area Ggoogle Tag Manager

They are quite cumbersome and verbose, but you only need to do these 2 things:

  • Copy and paste the first GTM code inside the <head> </head> . tag pair

  • Copy and paste the rest of the text into the <body> </body> . tag pair

To check if you have installed Google Tag Manager correctly, you may need to install the Google Tag Assistant tool  in your Chrome browser.

tag assistant google chromeInstructions on how to install GTM into Google Chrome

Once the installation is done, you just need to turn on your website, click the Tag Assistant icon in the toolbar.

how to install google tag manager on chrome browser

Complete the installation of Google Tag Manager in Google Chrome browser

When the Tag Manager tag is yellow or blue (as shown above), rest assured that you have successfully installed Google Tag Manager !

If the Tag Manager tag shows red, then you did something wrong, so the installation was not successful. Please check the location of your card.

Instructions on how to use Google Tag Manager: Tags & Triggers

Let's take a closer look at the components of GTM - Google Tag Manager and how to use them to send data - like Page Views and Clicks - to Google Analytics.

In GTM there are 2 main components:

  • Tags (actions) – Tell Google Tag Manager what you want to do, for example “you want to send a page view to Google Analytics.”

  • Triggers (triggered) – Notify Google Tag Manager when you want to add Tag Manager , for example “anytime someone visits one of your webpages”

Before learning how these two parts come together, let's create an account first.

How to setup Google Tag Manager

Basically, how to set up Google Tag Manager has 5 main steps:

  1. Create a new Tag Manager

  2. Select the Google Analytics item: Universal or Classic Analytics

  3. Format card structure

  4. Identify triggers

  5. Set up and name tags

Creating an account is really easy! Just go to the “ Google Tag Manager ” page and log in, then you will be asked to set up the content.

Typically, you will create content for each website that you want to monitor. Once you've created your account and first content, Google Tag Manager will give you a piece of code that looks like this:

google tag manager tracking code

Google Tag Manager tracking code (GTM Code) provided when registering an account

Just copy and paste this code right after the opening <body> tag on your website. If your website uses WordPress, there are some plugins like OptimizePress 2.0 that make it easier to implement these operations.

Step 1: Create a new tag

After creating an account, start creating your first tag without having to complicate matters! Make it simple!

Example: In this first tag, I want Google Tag Manager to report 1 pageview to Google Analytics every time someone visits the website.

Here's how to set it up specifically…

 Create a new tag by clicking “Tags” in the left menu bar and then clicking “New” .

how to use google tag managerInstructions for creating tags in Google Tag Manager

Then Google's tag manager will want to know the type of product you want to tag. Here you choose Google Analytics !

Step 2: Select the Analytics section

In GTM (Google Tag Manager) , the tool will give you 2 choices: Universal or Classic Analytics. Usually we will choose Universal, because it is available by default and this is also the latest version of GA.

universal analytics

Choose Universal Analytics for more convenient work

After selecting “Continue”, you need to tell GTM where the page view information is sent.

Step 3: Format your tag structure

In this case, you need to fill in your real Property ID information. Example Property ID is “UA-12345678-9”

(If you do not know your exact ID, see the instructions below)

google tag manager tag structure

Google Tag manager tag structure format

Step 4: Identify the Triggers

After selecting “Continue”, you need to define the trigger again. Remember that a “trigger” is your way of telling GTM when it needs to trigger this particular tag.

In this case, you want to report the number of page views when someone visits your website. So we will choose “all page” from the list of preset triggers.

triggers

Select All Pages to track the number of website visits

Step 5: Set up and name your tag

After selecting “All Page” > Continue to select “Create tag”

Google Tag Manager will ask you to name a new tag. For example, I named this tag “GA – Page view”.

name tag

Name a tag of your choice

Here's a super easy trick… GTM will list all the cards in alphabetical order.

That's why I started this tag name as “GA -“. To ensure that all my Google Analytics tags are grouped together and easily found afterwards.

Once the card has been named, the final step is…

Google Tag Manager will not immediately post your changes. Instead, just like when you create a WordPress post, you will need to “Publish” your changes.

Note: Avoid duplicating your data

If you use Google Tag Manager to control your Google Analytics .

Note: Remove the existing Google Analytics Code Tracking from the pages. Otherwise, the old GA code will collect the data & the new GTM tag will also report back… thereby creating duplicate data.

And no one wants to get duplicate data, right?

Your first tag, message to GTM send pageview views to Google Analytics. And your first trigger will tell GTM to send that pageview every time the page is loaded.

To track SEO results, you can't help but track the SEO results that you have worked so hard to do, right? Let's find out the  free keyword rank checker tools  right away!

Google Tag Manager uses these concepts to handle how tags are configured and activated

Tag: A tag is a code that sends data to a system like Google Analytics.

Triggers: Triggers that handle certain events, like clicks, form submissions, or page loads.

Variable: A variable is a named placeholder for a value that will change, such as a product name, price value, or date.

Data Layer: Tag Manager implements a data layer to temporarily hold values ​​in the client application so that they can be used by tags, triggers, and variables.

Tags and Triggers

Tags are a piece of code that executes on a page or mobile app. It can serve a variety of uses, but most cards are used in 

Google Tag Manager is designed to send tracking information from your website to third parties. Examples include the Google Analytics tag and the Google Ads conversion tracking tag.

With Google Tag Manager, you control all your tags from the web user interface.

The tag executes or fires in response to an event. Events can be page load, button click, page scroll, etc. In Google Tag Manager, you define triggers to handle those events and specify when the tag should fire.

Triggers and variables

There are many pre-made variables to choose from, and you can configure additional custom variables. For example, the predefined variable “URL” contains the address of the currently loaded page. If you want the tag to fire only on the page: 

  • Event: Page Views

  • Trigger Type: Page Views

  • Triggered when: Several page views

  • Activate the tag when these conditions are true: URL contains example.com/purchase/receipt.html

Configure built-in or custom variables to provide information to your app when you need it. Use these variables in trigger conditions or to pass information into tags.

Variables and data classes

The data layer is used to hold data. This is a structured format understood by tag managers to make it easy to move that data from your website or mobile app to tags, triggers, and other variables in the browser. card management.

You don't necessarily have to set up a data layer for the variable to retrieve information. Tag manager variables can also be configured to retrieve values ​​directly from JavaScript variables, first party cookies, from the DOM. However, the best practice is to have your variables retrieve information directly from a well-organized data layer object.

Data layer implementations can minimize the possibility of data loss from inadvertent code changes, encourage a well-organized and accessible data model, and simplify troubleshooting .

Note: For web applications, each page must have code to add the necessary information to the data layer, the data layer does not automatically exist on the pages.

Variables in GTM

Obviously, Google Tag Manager has quite a few cool features!

Google Tag Manager also has another function called “variables”. So what are Data Variables in Google Tag Manager? Let's find out more!

What are Variables in Google Tag Manager?

Data variables – These variables are not required to be set. But it does allow GTM to access additional information needed to complete what you asked for earlier. That way your triggers and tags can do more.

Example: When you set UA-12345678-9 as the Property ID for Google Analytics, you may later set up multiple Google Analytics tags and often have to search for UA. In this case, you can make a fixed variable so that it's no longer time consuming.

Let's say I name the variable I'm about to create “My UA Variable” and assign it the value “UA-12345678-9”.

How to create a data variable

Step 1:  Create a data variable by selecting “Variables”

Step 2:  Select the type of variable you want to create. In the example below, I chose “Constant” because there is no longer a need to set a new variable whose value remains the same each time gtm is used.

Step 3:  Assign the appropriate value and name the data variable

Google Tag Manager always asks to know what value you will assign to your new variable.

how to use google tag manager

Name a tag of your choice

Step 4: Customize Variables

Once I've saved the new variable, I'll go back to the edit tag a bit so it uses the new variable. Instead of having to enter the code "UA-12345678-9" each time. Select the “GA – Page view” tab you just created earlier, and edit.

You will have to find out the UA# you entered, delete it. Next, click the “block” icon on the right hand side, and then select the variables you can use (including the one you just created).

custom data variable

Variable data can be adjusted

Step 5: Select the variable “My UA” and save it!

Again, you must replace “UA-12345678-9” with your real Google Analytics account, this is just my example.

More Google Tag Manager Apps: Tags, Triggers, and Variables

What else can you do with GTM? Much.

You can also set up a tag that automatically tracks each time a customer visits one of the URLs and sends the number of clicks to Google Analytics with the following details:

  • Which pages are visited by customers when they click?

  • And what pages do they click on…

I would try using tags, triggers and using variables to implement these operations.

Create a tag

First, I'll want to enable some of the built-in variables so that  Google Tag Manager  can automatically collect the metrics I need.

Click on “Variables”

variables

Enable variables in the variables . section

… and select all the variables in the Pages & Utilities panel “Configure”

pages and utilities in the configuration table

Select all variables in Configuration

I will try to give you an example to make it easier for you to understand. Let's make a tag that can

  • Automatically track the number of clicks on the URL

  • Notify GA as soon as 1 click is recorded

  • Send the URL of the page users visit when they click the link

  • Submit the URL of the link the user clicked on

The required tag above will do this:

custom tag templates

Custom tag templates – Google Tag

You now have a notification tag to GTM so that it reports the click data it gets to Google Analytics. And then show the details of that click (Including the page they visited and the URL of the click).

Trigger

Next, you will declare GTM to know when it will notify these details to Google Analytics, at this point, you have to ask for a trigger.

First, select “Click” >> Then select “New”

Here's how you set up your trigger…

trigger trigger

Interface of setting trigger

Data variables

Once you've saved the trigger for your new tag, continue the process by publishing the changes. You then go to Google Analytics and see the new results through the BEHAVIOR > EVENTS reports.

This information of  Google Tag Manager  is really valuable. Once you've created your first card, it's easy to get a feel for how things are going.

The influence of Google Tag Manager on SEO

I'm sure there are a lot of people who think that using GTM is only to increase conversion rates? But really, Google Tag Manager greatly affects your SEO process.

GTV SEO has gone through more than 100 projects and I have also gathered a few influences such as:

1. Optimizing Analytics metrics

First about how GTM can measure user behavior. You know, users are often difficult. 

Then I can optimize elements, banners, content, .. based on user behavior (via Google Analytics, Hotjar, etc. From there, I can improve the quality of the content as well as set better CTAs. Thus, effective for Time On Site and Bounce Rate.

2. Code the code that runs Automation

You can use Google Tag Manager to code code that runs automatically in the <head> tag. Those codes can be auto Schema JSON-LD to help optimize the time of making schema for blogpost or product articles (e-commerce market with thousands of products, this is great).

In addition, it also helps you compress the code to speed up page loading – A ranking factor of Google.

Tips: You can write schema through Google Tag Manager to speed up page loading.

If you are worried, does GTB affect WordPress too much? Then the answer is: No problem, you can rest assured when optimizing GTM!

But if you are using other source codes like Joomla, CMS Made Simple or Haravan, Sapo, Shopify, hand code,.. Then inserting code through Google Tag Manager will be a true "lifesaver" for you. 

insert code using gg tag manager

Insert code through Google Tag Manager

Conclude

Hopefully through this article, you can get a basic knowledge of what Google Tag Manager is as well as how to set up and understand the installation instructions of Google Tag Manager.

Also understand the basics of this great Google tool and use GTM in your business effectively.

Good luck!

In addition, if you have a need to find a reputable and quality SEO service, you can refer to GTV SEO's HCM SEO service.

We are always committed to helping you develop your business and enhance your brand at the most optimal cost.

Use the software now:  https://tagmanager.google.com/#/home

Google Tag Manager is one of the 13 most effective SEO tools today. Also you can refer to other tools:  Ahrefs ,  SEO GSA Ranker.

References:

  1. “An Introduction to Google Tag Manager” – Moz
    https://moz.com/blog/an-introduction-to-google-tag-manager

  2. “Google Tag Manager (GTM)” – Oberlo
    https://www.oberlo.com/ecommerce-wiki/google-tag-manager

  3. “What Is Google Tag Manager? (And Why Your Site Needs It)” – WebFX
    https://www.webfx.com/blog/marketing/what-is-google-tag-manager/

#gtvseo #gtv_seo #google_tag_manager

Thông tin liên hệ:

GTV SEO

Địa chỉ: Số 91, Đường số 6, Khu dân cư Cityland Park Hills, Phường 10, Quận Gò Vấp, TP. HCM

SĐT: 0919-009-319

Email: info@gtvseo.com

Không có nhận xét nào:

Đăng nhận xét