In the previous article, we talked about Google Tag Manager, who will find it helpful, and the benefits of using it in digital promotion. So, if you understand the importance of using GTM for business, we suggest you read the instructions for creating tags for Google Analytics.
Stage 1 — creating a tag
In GTM, all tag templates are divided into three groups: recommended, user-oriented, and third-party services. They are easy to use because you do not need to edit or adjust the tracking code in your tags. To start, you usually need to enter 1-2 unique parameters and set a trigger. Recommended tags collect information about users, including which sites they visit, what they watch and search for, how long, and what they are interested in. This data will help you make adjustments to your advertising strategy. What does Google Analytics track, and what tags does it use for this:
- Pages view — setting the base code of Google Analytics (required with the trigger All pages).
- Events — tracking button clicks, submitting forms, interactions, etc.
- Transactions — obtaining transaction data.
- Social Networks — analysis of user interaction with the site through Facebook, Twitter, and other networks.
- Time — an analysis of events that work on a timer.
- The appearance of links — monitoring the users’ transition from the site through external links or downloads of files on the page.
- Change the appearance of the form — cross-domain tracking.
Stage 2 — creating a trigger
A trigger is a must for activating or blocking a tag. You can create triggers in two ways: in the Triggers section on the sidebar or in tags directly. Activation of all triggers in Google Tag Manager occurs after some action is triggered:
- view the page — at the beginning of the download, when loading HTML or fully loading the page;
- click — when clicking on a button, link, picture, form, etc.;
- submitting a form — after filling out and submitting any form;
- changes in history — when changing a URL snippet (it is used for anchor links of one-page sites).
- timer — triggers after a set time interval;
- user events — you determine which actions you want to track.
You can also create a locking trigger, a condition that does not trigger the tag. For this, add an exception to the settings for the trigger that was created the day before.
Stage 3 — creating a variable
Variables help you track actions more accurately and filter trigger activation. You can use them to specify when to activate a trigger or tag. Variable types in Manager:
- nine non-editable built-in variables: pages, utilities, errors, clicks, forms, scrolling, history, video, and visibility;
- designed for users: created independently.
Stage 4 — tag verification and publishing
Use the Preview to check the tags and confidence that the data is tracked. If all previous steps are successful, the tag information will appear in the console. When you have finished creating the tag, clicking the Publish button will display all data about tags, triggers, and variables in the Versions section. So, now let’s briefly list the steps for creating tags in Google Tag Manager:
- create a trigger:
– choose the type of trigger;
– specify the conditions for tag activation;
– add a trigger to the tag.
- create a variable:
– choose the type of variables;
– specify the parameters.
- check the tag:
– turn on preview;
– check your Google Analytics data traffic.
- publish a tag.