Google Tag Manager Tutorial for Beginners (2023)
Introduction to Google Tag Manager
In this section, the speaker introduces Google Tag Manager and explains how it can help digital marketers and analysts implement marketing and analytics tracking codes more efficiently.
What is Google Tag Manager?
- Google Tag Manager (GTM) is a tool that allows you to manage tracking codes for websites.
- GTM stores all your tracking codes in a single place, making it easier to find them, manage them, and decide when to fire them.
- GTM makes you less dependent on developers, allowing you to add tracking codes by yourself and do so much faster.
Benefits of Using Google Tag Manager
- All your tracking codes are stored in one place, making it easier to manage them.
- You are less dependent on developers, which speeds up the process of adding tracking codes.
- There are various learning resources available for GTM in different formats like blog posts, documentation videos, forums, and communities.
Getting Started with Google Tag Manager
In this section, the speaker explains how to get started with GTM by creating a new account.
Creating a New Account
- Go to tagmanager.google.com or search for "Google Tag Manager" on Google.
- Follow the prompts to create a new account if you have never worked with GTM before.
Setting Up Google Tag Manager
In this section, we will learn how to set up Google Tag Manager and create a container for website tracking.
Creating a Container
- A GTM account is required to access the platform.
- One GTM account can have multiple containers, which are like buckets where you store your tracking codes.
- Separate containers are recommended for each website or group of websites with different structures and tracking codes.
- To create a container, click on "Create" after selecting "Web" as the target platform and agreeing to the terms of service.
Interface Overview
- The left sidebar provides access to tags, triggers, and variables.
- Tags are used to track specific actions on your website.
- Triggers determine when tags should fire based on certain conditions.
- Variables hold information that can be used in tags and triggers.
- Templates can be imported from the gallery for more complex setups.
Workspace and Versions
- The workspace is where most of the work is done in managing tags, triggers, and variables.
- Every time changes are made in the container, a new version is created upon publishing.
- Previous versions can be accessed and published if needed using the admin section.
Testing Changes
- Before publishing changes, it's highly recommended to test them using preview mode within the boundaries of your browser.
Overview of Google Tag Manager Installation
In this section, the speaker provides an overview of how to install Google Tag Manager on a website.
Installing GTM on Your Website
- Two ways to install GTM depending on your content management system (CMS)
- Click container ID and give codes to developer
- First code added to head of website
- Second code added to body of website (optional)
- Use CMS plugin for faster installation
- Developer must add GTM code to every page of website for it to work properly
Understanding Tags, Triggers, and Variables
- Tags are pieces of code that fire based on conditions set in GTM
- Triggers determine when tags fire
- Variables provide information for tags and triggers
Understanding Tags, Triggers, and Variables
In this section, the speaker explains the roles of tags, triggers, and variables in Google Tag Manager. They use three questions to explain these concepts: what do you want to do (tag), when do you want to do it (trigger), and what exactly or how exactly (variables).
Tags
- A tag is a code that tracks an action on a website.
- Examples of tags include Google Ads conversion tags and tracking purchase tags.
Triggers
- A trigger specifies when a tag should be activated.
- Examples of triggers include when a user makes a purchase or submits a form.
Variables
- Variables are used to specify the exact conditions for activating a tag.
- For example, if you want to fire a tag on the order confirmation page, you need to specify the page URL that contains "thank you for purchasing."
- Another example is sending the value of order total with the conversion tag as another variable.
Introduction to Google Analytics 4
In this section, the speaker introduces Google Analytics 4 and its capabilities for measuring user behavior on websites.
Reports in Google Analytics 4
- Once installed, Google Analytics 4 provides data about user behavior on websites.
- Reports can be accessed by going to "Reports" in the platform's interface.
- Reports may vary depending on settings chosen by users but can include information about where visitors are coming from (acquisition), which pages are most popular (page views), and event tracking.
Event Tracking in Google Analytics 4
- Event tracking allows users to track specific actions taken by visitors on their website.
- Examples of events include form submissions or clicks on specific buttons.
Google Analytics and Monetization Reports
In this section, the speaker discusses how to use Google Analytics to generate monetization reports. The reports show additional data such as e-commerce purchases, top products, and revenue generated from each product.
Using Monetization Reports
- Monetization reports provide additional data such as top products and revenue generated from each product.
- Freeform exploration is used to visualize data in a table format.
- Funnel exploration is used to define a user journey and see how people are dropping off at each step.
- Path exploration is used to see how people navigate between different pages or in what order particular events are happening.
Path Exploration
In this section, the speaker explains how path exploration works in Google Analytics. Path exploration allows users to see how visitors navigate through their website.
Understanding Path Exploration
- Path exploration shows the most popular paths that visitors take on a website.
- Reverse pathing can be done by starting from the ending point (e.g., order confirmation page) and going backwards to see what visitors were doing before making a purchase.
Creating Your First Tag
In this section, the speaker explains how to create your first tag in Google Analytics 4.
Creating Your First Tag
- To create your first tag, go to analytics.google.com and enter your company name if you're new to Google Analytics. If you already have at least one GA4 property, log into any of those properties and go to admin > create account.
- Create a property, which is like a bucket where you will store the data.
- Set up your data stream by selecting the type of data you want to collect (e.g., web, iOS, Android).
- Install the GA4 tag on your website or app using Google Tag Manager or Firebase.
Setting up Google Analytics 4
In this section, the speaker explains how to set up Google Analytics 4 and start collecting data.
Selecting Baseline Reports
- Click "Next" and select the option for standard reports to streamline the learning process.
- Choose "Baseline Reports" and click "Create."
Creating a Data Stream
- Start data collection by creating a data stream.
- Select "Web" if working with a website or another data stream type for mobile apps.
- Enter the URL of the website in the provided field.
Verifying Automatic Event Tracking
- Verify automatic event tracking, which tracks page views and additional events such as site search, video engagement, and file downloads.
- Disable form interactions to avoid false positives by clicking on the gear icon and then clicking save.
Installing Code with Google Tag Manager
- Copy the measurement ID from Google Analytics 4 after creating a stream.
- Go to Google Tag Manager, create a new tag configuration, select "Google Analytics 4 Configuration," paste in the measurement ID, name it (e.g., GE for config), keep all other settings as they are, and click save.
Testing Changes with Preview Mode
- Test changes before submitting them by checking if Google Analytics 4 is activated properly on your site using preview mode in Google Tag Manager.
- Enter your URL into preview mode and connect it.
- Check if your G4 tag has successfully fired under Container Loaded Events in Tag Assistant Tab.
- Check if data has been received by Google Analytics 4 in debug view under Admin.
Google Tag Manager Preview Mode
In this section, the speaker explains how to use the preview mode in Google Tag Manager to troubleshoot tags and test changes before publishing them.
Using Preview Mode
- Preview mode shows the stream of Google Tag Manager events.
- Clicking on an event allows you to troubleshoot if a tag did not fire when it was supposed to.
- You can switch between values and names of variables shown in little blocks.
- Share your preview mode link with others for help troubleshooting.
Publishing Changes
- Click "submit" to publish changes made in Google Tag Manager.
- Add a version name and description for easy reference later.
- Roll back to previous versions if errors occur after publishing.
- Repeat this process every time you make changes in Google Tag Manager.
Installing Custom Templates and Tracking in Google Analytics 4
In this section, the speaker discusses how to install custom templates using Google Tag Manager. They also explain the different types of automatic tracking events available in Google Analytics 4 and how to use enhanced measurement to track additional events.
Installing Custom Templates
- To find a custom template, go to "Templates" then "Search Gallery."
- Use the search feature to find the tool you want to install.
- If you can't find a custom template, use a custom HTML tag instead.
- Go to "Tags," click "New Tag Configuration," and choose "Custom HTML."
- Paste the JavaScript code for your desired platform into the tag configuration.
- Set the trigger for when you want the chat widget or other tool to fire.
- Test your tag by clicking "Preview," then "Continue," and going to your website.
Automatic Tracking Events in Google Analytics 4
- Google Analytics 4 automatically tracks events such as first visit, session start, and user engagement.
- Enhanced measurement is a feature set that can track additional events automatically.
- To learn more about enhanced measurement, go to "Google Analytics," then "Admin," then "Data Streams," and click on your website data stream.
- You can enable or disable specific events under the enhanced measurement section.
Using Enhanced Measurement
- To see how automatic tracking works, go to Google Tag Manager's debug view after clicking preview and connect.
- Click on an outbound link or scroll below 90% of page height for examples of tracked events.
- Google Analytics 4 can also track links that download or open certain files (e.g., PDF).
Event Tracking and Triggers
In this section, the speaker discusses event tracking and triggers in Google Analytics 4. They explain how to send parameters with events, recommended event names, and custom events. The speaker also covers trigger types in Google Tag Manager.
Sending Parameters with Events
- To learn more about what kind of parameters can be sent with events, check out the recommended parameter list.
- There are four groups of events: recommended, custom, user-defined, and automatic.
- After sending events to Google Analytics 4, they will be available in various sections of the interface such as reports engagement and then events.
Recommended Event Names
- When it comes to recommended events like sign up or purchase tracking, most of them are not required but highly recommended.
- For e-commerce tracking event names such as purchase or refund or add to cart should be named exactly like this.
- It is always a good practice to check the list of recommended events before creating custom ones.
Custom Events
- Custom events allow you to send any event name you want along with parameters that might be recommended or custom.
- After sending custom events to Google Analytics 4 they will be available in various sections of the interface such as reports engagement and then events.
Trigger Types in Google Tag Manager
- Understanding how triggers work is necessary for event tracking in Google Tag Manager.
- There are several supported trigger types including page view, window loaded, click triggers (just links), all elements trigger (for clickable non-link elements), element visibility trigger, form submission trigger, scroll depth trigger, embedded YouTube video player trigger, history change trigger, JavaScript error trigger, timer trigger and a trigger group.
- Even though Google Tag Manager offers a variety of triggers they are not enabled by default so you need to create a new one.
Previewing and Testing Container Changes
In this section, we learn how to preview and test container changes in Google Tag Manager. We also explore link click tracking capabilities and how to enable click variables.
Enabling Link Click Tracking
- Refresh the preview mode every time you make a change in your container.
- Three triggers are coming from Google Tag Manager, which enables link click tracking capabilities.
- Enhanced measurement is enabled in Google Analytics 4, which results in three additional link clicks.
- Information about link clicks can be fetched from the data layer but is not available as variables.
Enabling Click Variables
- To solve the issue of unavailable data as variables, go to GTM variables and enable all click variables.
- After enabling click variables, refresh the page and go to preview mode to test if it works.
Narrowing Down Trigger for Specific Link Clicks
- To send an event to GA4 only when specific links are clicked, narrow down the trigger with variables instead of just some link clicks.
- Find similarities between different link clicks by going to preview mode > clicking on links > going to variables. In this example, all menu link clicks contain the same class "site nav link main," which can be used in the trigger.
Configuring GA4 Event Tags
In this section, the speaker explains how to configure GA4 event tags in Google Tag Manager.
Creating a New Tag Configuration
- To create a new tag configuration, go to "Tags" and click "New Tag Configuration."
- Select "GA4 Event" if you want to send an event specifically.
- Choose the configuration tag that has already been created. This means that the event tag will reuse some settings from the configuration tag, including the measurement ID.
Adding Event Parameters
- Expand the "Event Parameters" section and click "Add Row."
- Come up with an event parameter name or check the documentation for supported events.
- Copy and paste link URL and link text parameters related to link clicks from enhanced measurement documentation.
- Pass values together with those parameters using collect text and click URL variables.
Triggering and Naming Tags
- Click anywhere for triggering and select previously created link click menu trigger.
- Name tags as G for event followed by the name of the event.
- Save changes.
Testing Tags
- Click preview to refresh preview mode and fetch latest updates of container.
- Click on links to test if tags are firing properly.
- Check debug view of Google Analytics 4 to see if events are being sent correctly.
Creating Custom Reports in Google Analytics 4
In this section, the speaker explains how to create custom reports in Google Analytics 4 and track menu link click events.
Tracking Menu Link Click Events
- To track menu link click events, go to G4 menu link click tracking and click publish.
- The change will go live within the next 48 hours and will appear in reports engagement and events.
- To see what links were clicked and which ones are more popular, create a custom report by going to explore then choose blank.
- In Dimensions, select event name click checkbox, link text click checkbox, and Link URL and click checkbox.
- In Metrics, add event count by clicking plus sign.
- Drag link text or Link URL (or both) to rows.
- Drag the event count to values.
- In Filters, drag the event name to filters and make sure that it exactly matches "menu link click" then apply.
- The report will not show any data immediately but after 24 or 48 hours it will start populating data.
Registering Custom Dimensions
- If you use different parameter names for example instead of "link text" or "link URL", you named them like "menu link URL" and "menu link text", these are no longer automatically recognized by Google analytics.
- You would need to register both of these parameters as custom dimensions so that they can be used in your reports.
- Go to Google Analytics for admin custom definitions create custom dimensions and then register both of these parameters manually.
- Enter the dimension name like "menu link URL" for example save it and do the same thing for the other parameter which is "menu link text".
- Once you do that then when the data starts coming into your reports you would be able to use this dimension in your report instead of the regular link text.
- Keep in mind that you can create up to 50 unique custom dimensions in your GE for property.
Conclusion
In this section, the speaker concludes the tutorial and encourages viewers to take his Google Tag Manager Masterclass for Beginners course.
- The tutorial provided a basic understanding of what Google tag manager is, how it works, and how to create our first setup.
- However, there are many other things that viewers will need to learn about Google tag manager.
- The speaker's full course for beginners called "Google Tag Manager Masterclass for Beginners" explains around 85% of what a beginner should actually know about Google tag manager.
- Viewers can find the link to the course below the video.
- If viewers found this video useful, they should hit the Thumbs Up Button below the video.
- This will help the speaker understand what videos viewers like and what he should create in the future.
- Viewers who want to learn more about Google tag manager or Google analytics 4 should consider subscribing to this channel.
Turn any video into a summary like this
YouTube links, meetings, lectures. With transcripts, search, and chat.