As the name implies, a tag management tool is a tool for “managing” “tags (measurement tags, advertising tags, etc.)”.
* The content of this article is the specifications of GTM / Google Analytics
It has been several years since the “tag management tool” was born.
The tag management tool was released by Google, which can be said to be a major figure in the IT industry, in 2012, and it has become popular at a rapid pace, and it seems that it has become commonplace today. It is no exaggeration to say that these days, anyone who manages and maintains measurement tags and advertising tags on websites has become compulsory.
What is GTM (Google Tag Manager)?
Google Tag Manager (abbreviation: GTM) is a tag management tool provided by Google as mentioned above.
In general, in order to use measurement tags and advertising tags, it is necessary to embed the tag passed by each tool as “embed this” in the HTML of the target page of the website. However, it is a fact that it is a lot of work to edit the HTML of various pages every time a tag is added or deleted.
Therefore, the tag management tool is to make it possible to “to which page” and “which tag to embed” from the online management screen of the tool so that you do not have to edit the HTML every time.
Anyone can use it free of charge, and there are no restrictions on the size of the website.
There is also a paid plan with features for larger operations, but there is no single application for GTM. If you want to use the paid version, you need to subscribe to Google Analytics 360 separately. If you subscribe to Google Analytics 360, you will also be able to use Google Tag Manager 360 (with “360” after the name when it comes to the paid version).
Tag management tools other than GTM include Yahoo! Tag Manager and Adobe Analytics, which are famous, but when compared with them,
- Can be used free of charge
- The screen and UI are simple and refreshing overall
- Made by Google, it works well with Google Analytics and Google Ads.
There are features such as.
Well, this Google Tag Manager.
By introducing it, you will be able to do the following.
- You can add, edit, and delete tags without (basically) editing the HTML of the page
- You can grasp the tags installed in the site from the management screen
- It is also possible to request tag setting work from an advertising agency etc. (by passing authority)
A particularly big advantage is that you will be able to add tags without editing the HTML.
As a side effect of this, there is a possibility that the time required for adding tags can be reduced.
On many sites, there are many cases where the person in charge of the system manages the operation of HTML on the page. Therefore, even if you try to add one tag, it often takes a lot of time to adjust it from the schedule of the person in charge. However, if the person in charge of advertising or the person in charge of access analysis who wants to add tags can use GTM, the number of people involved in the addition work will decrease, so it will be possible to add tags more quickly.
However, in order to use it (not limited to GTM but all tag management tools), it is necessary to insert the tag that has been activated by GTM into the HTML of the page you want to use. In other words, HTML editing will occur for the first time at the time of introduction.
That’s something you need to keep in mind when scheduling your deployment.
asic knowledge of GTM
To use GTM, you first have to think about account design.
The account structure of GTM consists of two layers, “account” and “container”, and the main setting work is for “container”.
What is an account?Refers to the group that manages containers.
It is common to divide by one account for each site management company.What is a container?Represents the site where the settings are actually made.
It is common to divide by one container for each site (or one domain).
The relationship between “account” and “container” is similar to the structure of accounts and properties in Google Analytics.
For example, if Company A wants to use GTM on three sites, create an account called “Company A” and have three containers such as “aaa.jp”, “bbb.jp”, and “ccc.jp” in it. It is in the form of creating.
Also, please note that settings cannot be shared between different containers. If you want to make the same settings, you need to make the same settings manually.
Conversely, if the containers are separated, they will not affect each other, so basically it is recommended to separate the containers for each site or subdomain.
After preparing the container for the site, set it in the setting work environment “workspace” in the container.
Since each workspace is independent, for example, changes made in workspace 1 will not affect other workspaces 2 and 3 until they are reflected as the latest version.What is a workspace?This is a working environment for actually changing settings on GTM.
With the free version of GTM, you can use up to 3 at the same time per container.
As a note of the workspace, it is necessary to reflect the setting changes in one entire workspace.
Therefore, if you try to change various settings in one workspace, it must be reflected only after all the setting changes are completed. This is because if a tag in the middle of setting is reflected in the presence, it will be reflected without the setting being completed.
So basically, it’s a good idea to keep in mind “separate workspaces for each task”.
For example, if the task “Mr. A wants to add tag a to page XX” and the task “Mr. B wants to add tag b1 to all pages and tag b2 to page XX” occur at the same time, A It is recommended that you work separately in the workspace for Mr. B and the workspace for Mr. B.
The setting work on the actual workspace sets the three elements of tag, trigger, and variable.
What is a tag?As the name implies, it refers to the “tag” you want to add to the page.
If the conditions of the associated “trigger” are met, the tag will be delivered to the page.What is a trigger?A “trigger” is a collection of conditions for delivering a “tag”.
A “trigger” is created by combining a “trigger type” that indicates timing and a “condition” created using “variables”.What is a variable?If you want to use something that may change depending on the situation with GTM, you need to register it as a “variable”.
For example, “URL” that differs for each page and “purchase amount” that changes for each user’s purchase correspond to “variables”.
“Variable” can be used as a condition of “Trigger” and also as a measurement value of “Tag”.versionA set of settings such as tags, triggers, and variables at the time of creation are saved together.
Since all the versions created in the past are left with the settings at that time, it is easy to return to the previous settings.
First, prepare the “tag” you want to add.
Next, check whether the conditions such as the page to which you want to distribute the tag have already been registered as “triggers”, and if they do not exist, register a new “trigger”.
If you want to register a new “trigger”, check if it is possible with the registered “variable” to set the condition, and if not, register a new “variable”. Also, if there is a part corresponding to “variable” in the item value of “tag”, register “variable” as necessary.
Once you have made all the settings, you can check the operation and then reflect it in the production environment.
In GTM, this work of “reflecting in the production environment” is called “publication”, and “publication” is performed in units of “version”.
When you “publish” a “workspace”, a “version” is created at the same time. And in the contents of “Version”, all the settings of “Workspace” are saved.
In other words, in GTM, it is not reflected in units of one tag, but in units of a set of settings.
GTM introduction flow and initial settings you want to set
Let’s take a look at the specific work procedure when actually introducing GTM.
We will introduce as an example the contents of creating an account / container, entering, checking the operation, and then publishing.Overall flow of introduction1. 1. Access the official website
2. Creating an account
3. Creating a container
4. Add GTM tag to site HTML
5. Add tags in the workspace
6. Check the operation using the preview mode
7. Published to production environment
(1) Access the official website
Go to the official GTM website and click the “Use for free” button to proceed to create an account / container.
At this time, you will be asked to log in to your Google account.
If you do not have a Google account yet, you can proceed to register a Google account from the screen that asks you to log in, so please proceed there.
(2) Create an account
When you log in to GTM for the first time, the first time you start from the account creation screen.
Create a GTM account with your company name.
Enter the company name in “Account Name”, select “Japan” for “Country”, and click the “Continue” button.
(3) Container settings
Next, move on to creating a container.
Enter the domain for which you want to use GTM.
Enter the domain for “Container Name” and select “Web” for “Container Location”.
Please be assured that the “container name” is just a name, so this container cannot be used only in the domain entered here.
(4) Add GTM tag to the HTML of the site
When the container is created, the tags required to use the container will be displayed.
Copy the displayed tag and add it to the HTML of the site you want to install.
Position in HTML to add GTM tags・ The upper tag (<script> ～ </ script>) is inside the <head> tag.
・ The lower tag (<noscript> ～ </ script>) is immediately after the <body> start tag.
You can see the same tag displayed at this time by clicking the container ID in the upper right corner of the workspace.
If you forget to save it, it’s okay.
Basically, it is recommended to put the page to add the tag to HTML to all the pages in the site.
If that is difficult, you can add tags only to the pages you want to use, and there is no problem in operation. However, please note that GTM cannot be used on pages that do not contain tags, so you will need to edit the HTML of the page each time you want to increase the number of pages that can be used by GTM.
(5) Add tags in the workspace
When the GTM tag is entered on the GTM usage target page, you are ready to use GTM.
Let’s set the tags you want to deliver from GTM in the workspace.
Register the tag of “Google Analytics”
Once the “Google Analytics Settings” variable is ready, it’s time to register the PV measurement tag.
This procedure is almost the same as for variables, just select the tag type, enter (select) the required items, and save the condition (trigger) to which you want to distribute the tag.
1. 1. Click “Tags” on the left menu to display the tag list screen.
2. Click the red “New” button under “Tags” to display the new tag registration screen.
3. Click the “Tag settings” area to select the type of tag you want to register, so select “Google Analytics-Universal Analytics” in “Recommended”.
4. Make sure that “Tracking type” is “Page view” and select the variable you registered earlier in “Google Analytics settings”.
5. Click the “Trigger” area at the bottom of the screen to display a list of registered triggers. Select “All Pages” and click the “Save” button at the top right of the screen.
6. “Change tag name” is displayed, so enter an arbitrary name (you can leave the default value) and click the “Save” button to complete.
This time, I introduced the measurement tag of Google Analytics as an example, but the basic procedure does not change even if it is another type of tag.
There are tags for various tools as “tag types”, so select the appropriate tag and set it. For example, if it’s a Google Ads tag, select “Google Ads Remarketing” if it’s a remarketing tag, or select “Google Ads Conversion Tracking” if it’s a conversion tag, and fill in the displayed setting fields.
If the tag you want to register does not exist in “Tag type”, select “Custom HTML” in “Custom”.
If you select the “Custom HTML” tag, a large free input field called the “HTML” field will appear, so copy and paste the full text of the tag you want to register in that field and save it.
In other words, remember that “custom HTML” = “other”.
(6) Check using the preview mode
After setting the tag you want to register, let’s check if the setting is actually working as intended.
GTM has a “preview” function for checking the operation.
When the “Preview” function is enabled, the set contents will be reflected only to the person who enabled it. In addition, it will also be displayed whether each tag etc. was actually delivered / not delivered, so check that.
1. Click the “Preview” button at the top right of the screen to enable “Preview”
2. Open the web page with the GTM tag embedded in another tab of the browser
3. Since the distribution status of each tag is displayed at the bottom of the screen, check that the PV measurement tag of Google Analytics registered earlier is displayed in “Tags Fired On This Page”
When “Preview” is enabled, an orange bar will be displayed at the top of the screen in the workspace.
Please note that if you change the settings while “Preview” is enabled, the settings will not be reflected unless you click the “Update” button.
Then, after viewing the actual page and checking the operation, you can exit “Preview” by clicking “Exit Preview Mode”.
Again, “Preview” is a function that reflects the “only for those who have enabled preview” setting.
Therefore, even if a general user accesses the same page, the settings will not be reflected, so please check the operation with confidence.
(7) Publication of tags
After setting the tags and checking the operation, you can reflect the set contents to general users by “publishing”.
The procedure is simple: just press the “Publish” button, enter (or don’t have to) the name and note of the “version” you want to create, and press the “Publish” button.
1. Click the “Publish” button at the top right of the screen to display the “Version” setting screen
2. Enter an arbitrary name in “Version name”, and enter a sentence summarizing the changes in the settings in “Version description”.
3. Click the “Publish” button in the upper right to complete the publication
When “Publish” is completed, “Version” is automatically created with the settings of “Workspace”, and the details screen of the created “Version” is displayed.
Please check the “Publication Date” column at the top. The date and time of “publication” is entered there, so if this column is displayed, “publication” is successful.
From the time “Publish” is completed, the settings are reflected to all users who access the page with the embedded GTM tag.
Precautions at the time of introduction
Be careful when introducing GTM for the first time.
Specifically, when introducing such as migrating “tags that were in the HTML of the original page” to GTM, you must be careful about the timing.
If you set “Tags that were in the HTML of the original page” to GTM, the tags that migrate to GTM must be deleted from the HTML of the page.
Because if the original tag remains in HTML, the same tag will move twice, once from “tags in HTML” and once from “tags delivered from GTM”, resulting in duplicate measurement. Because it will do. For example, if you use a PV measurement tag such as Google Analytics, 2 PV will occur even though you have only seen it once.
On the contrary, the fact that “HTML with the migration target tag deleted” is reflected in the production environment before “publishing” GTM also causes a period when the tag does not exist (a period when measurement is not performed). This causes another problem.
To avoid this, it is recommended to follow the procedure below.
- Reflect “Delete tag to migrate to GTM” and “Insert GTM tag” in HTML of test environment
- Set GTM while checking the operation with “Preview” in the test environment
- “Publish” when GTM settings are complete
- Reflect the HTML of the test environment in the production environment
The point is to perform “GTM’public'” and “remove tags to be migrated from HTML” at the same time for the production environment.
If you follow the above flow, even if you “publish” GTM in (3), it will not affect the production environment at that point, so you can “publish” it in advance. After that, if “HTML with GTM tags added and migration target tags deleted” is reflected in the production environment, the tags will be automatically migrated from HTML to GTM at that timing.
These are just the points to note when migrating tags that were previously in HTML to GTM. If you set a tag that does not exist in HTML to GTM (because it does not exist in the first place), there is no duplicate measurement or lost measurement period, so you do not have to worry about it.
In addition to timing precautions, there are also major issues that cannot be avoided.
That is, the work of “adding GTM tags to the HTML of all pages in the site” takes a considerable amount of man-hours. This point depends on the structure of each site, so please consult with the person in charge of the system.
This is the flow of introducing GTM.
This time, we set up a fairly simple setting as an example, but I think that there are people who want to go one step further, such as “I want to put out an ad conversion tag on the purchase completion page”.