Google Tag Manager

How to Add Tags in Google Tag Manager

alt-tag
Learn how to add tags in Google Tag Manager to start tracking key events and actions on your website. This guide helps you configure and manage tags for better data collection and analysis.

Introduction

Google Tag Manager (GTM) is a powerful tool that simplifies the process of managing and deploying marketing tags and tracking codes on your website or app. Tags are snippets of code that collect and send data to various platforms, such as Google Analytics, Google Ads, and other third-party services. Adding tags in GTM allows you to implement and update tracking mechanisms without needing to modify your website's code directly. This guide will walk you through a detailed, step-by-step process for adding tags in Google Tag Manager, helping you efficiently manage your tracking setup and ensure accurate data collection.

Step 1: Log In to Google Tag Manager

  1. Access Google Tag Manager:
  2. Sign In:
    • Enter your Google account credentials to log in to Google Tag Manager.
  3. Select Account and Container:
    • If you manage multiple GTM accounts, select the appropriate account and container where you want to add tags. A container is associated with a specific website or app.

Step 2: Navigate to the Tags Section

  1. Open the GTM Dashboard:
    • Once you are in the desired container, you will be taken to the GTM dashboard.
  2. Access Tags:
    • In the left-hand menu, click on "Tags" to view and manage your existing tags.
  3. Create a New Tag:
    • Click on the "New" button to start creating a new tag.

Step 3: Configure Tag Settings

  1. Name Your Tag:
    • Click on "Tag Configuration" and enter a descriptive name for your tag. This helps you identify the tag later, such as "Google Analytics Pageview" or "Facebook Pixel."
  2. Select Tag Type:
    • Choose the type of tag you want to add from the available options. Common tag types include:
      • Google Analytics: Universal Analytics
      • Google Ads: Conversion Tracking
      • Facebook Pixel
      • Custom HTML
      • Custom Image
  3. Configure Tag Details:
    • Depending on the tag type selected, enter the required details. For example:
      • For Google Analytics: Enter your Tracking ID, choose the track type (e.g., Pageview, Event), and configure additional settings as needed.
      • For Custom HTML: Paste your custom HTML code snippet into the provided text area.

Step 4: Set Up Triggers for Your Tag

  1. Access Triggers:
    • After configuring the tag settings, click on "Triggering" to define when and where the tag should fire.
  2. Choose or Create a Trigger:
    • You can either select an existing trigger from the list or create a new one by clicking on the "+" button. Common triggers include:
      • Page View
      • Click
      • Form Submission
      • Custom Event
  3. Configure Trigger Details:
    • For the selected trigger, configure the trigger settings. For example:
      • For Page View Trigger: Specify the page URL or path where the tag should fire.
      • For Click Trigger: Define which clicks should activate the tag based on conditions like element ID or CSS class.

Step 5: Define Tag Firing Rules

  1. Set Firing Rules:
    • In the trigger configuration, set conditions to control when the tag should fire. For example, you can specify that the tag should fire on all pages or only on specific URLs.
  2. Use Advanced Settings:
    • Utilize advanced settings if needed, such as defining exceptions to prevent the tag from firing under certain conditions.

Step 6: Test Your Tag Implementation

  1. Preview Mode:
    • Click on the "Preview" button to enter GTM's Preview Mode. This allows you to test your tag implementation before publishing changes.
  2. Test Tag Firing:
    • Open your website in a new tab and perform actions that should trigger the tag. Check the GTM debug console to ensure that the tag is firing as expected.
  3. Verify Data Collection:
    • For tags related to analytics, verify that data is being collected correctly in the respective platforms (e.g., Google Analytics, Facebook Ads).

Step 7: Publish Your Changes

  1. Review Changes:
    • Once you are satisfied with the tag setup and testing, click on the "Submit" button in GTM to review your changes.
  2. Add a Version Name and Description:
    • Enter a version name and description to document the changes you made. This helps with tracking and future reference.
  3. Publish:
    • Click on "Publish" to deploy the changes and make the new tag live on your website.

Step 8: Monitor Tag Performance

  1. Access Tag Reports:
    • Use Google Tag Manager's built-in reports or integrate with Google Analytics to monitor the performance of your tags.
  2. Analyze Data:
    • Review the data collected by your tags to ensure it aligns with your goals and objectives. For example, check conversion tracking data or event tracking metrics.
  3. Make Adjustments:
    • Based on the performance data, make any necessary adjustments to your tags, triggers, or settings to optimize tracking accuracy and effectiveness.

Step 9: Manage and Organize Tags

  1. Review and Update Tags Regularly:
    • Regularly review your existing tags and update them as needed. This includes adding new tags, modifying existing ones, or removing outdated tags.
  2. Use Tag Naming Conventions:
    • Implement consistent naming conventions for your tags to keep them organized and easily identifiable.
  3. Utilize Folders and Workspaces:
    • Use folders and workspaces in GTM to organize tags, triggers, and variables, especially if you manage a large number of tags.

Step 10: Stay Informed on GTM Best Practices

  1. Explore GTM Features:
    • Stay updated on new features and capabilities in Google Tag Manager by visiting the Google Tag Manager blog and release notes.
  2. Participate in Training:
    • Consider participating in GTM training or webinars to enhance your skills and stay informed about best practices.
  3. Implement Best Practices:
    • Regularly review and implement best practices for using Google Tag Manager to ensure efficient tag management and accurate tracking.

Summary

Adding tags in Google Tag Manager is a crucial step in managing and deploying tracking codes for your website or app. By following these ten steps logging in, navigating to tags, configuring tag settings, setting up triggers, defining firing rules, testing implementation, publishing changes, monitoring performance, managing tags, and staying informed on best practices you can effectively utilize GTM to enhance your data tracking and analytics capabilities. Regular updates and monitoring will help ensure that your tags continue to provide valuable insights and support your marketing objectives.

Future-proof your marketing measurements

green-tick

Forecast accurately with no-code ML & AI model setup that provides comprehensive predictive insights

green-tick

Stay in the know with always-on measurements providing real-time channel performance