Enroll Course

100% Online Study
Web & Video Lectures
Earn Diploma Certificate
Access to Job Openings
Access to CV Builder



online courses

How to set up and Track Custom Dimensions and Metrics in Google Tag Manager

Advanced IT Systems Engineering Certificate,Advanced IT Systems Engineering Course,Advanced IT Systems Engineering Study,Advanced IT Systems Engineering Training . 

Google Tag Manager (GTM) provides a powerful way to manage and deploy analytics and marketing tags on your website without having to modify the codebase directly. Custom dimensions and metrics in Google Analytics allow you to collect and analyze additional data specific to your business needs. Here’s a detailed guide on setting up and tracking custom dimensions and metrics using Google Tag Manager.

Understanding Custom Dimensions and Metrics

Custom Dimensions and Custom Metrics enable you to collect data that is not automatically tracked by Google Analytics.

  • Custom Dimensions: These are similar to default dimensions but allow you to create your own attributes.
  • Custom Metrics: These allow you to track custom numerical data.

Step-by-Step Guide

1. Setting Up Custom Dimensions and Metrics in Google Analytics

A. Create Custom Dimensions
  1. Log in to Google Analytics.
  2. Navigate to Admin: In the lower-left corner, click Admin.
  3. Select Property: In the Property column, select the property you want to configure.
  4. Custom Definitions: Click Custom Definitions and then Custom Dimensions.
  5. Create a New Custom Dimension:
    • Click + New Custom Dimension.
    • Enter the Name for the custom dimension (e.g., User Type).
    • Select the Scope (Hit, Session, User, or Product).
    • Check Active.
    • Click Create.
  6. Note the Index Number: After creating, note the index number assigned to the custom dimension. You’ll need this for the GTM setup.
B. Create Custom Metrics
  1. Navigate to Admin: In the lower-left corner, click Admin.
  2. Select Property: In the Property column, select the property you want to configure.
  3. Custom Definitions: Click Custom Definitions and then Custom Metrics.
  4. Create a New Custom Metric:
    • Click + New Custom Metric.
    • Enter the Name for the custom metric (e.g., Revenue Per User).
    • Select the Type (Integer, Currency, Time, or Float).
    • Define the Minimum and Maximum Values if needed.
    • Click Create.
  5. Note the Index Number: After creating, note the index number assigned to the custom metric.

2. Configuring Google Tag Manager

A. Set Up Variables in GTM
  1. Log in to Google Tag Manager.
  2. Select Your Container: Select the container you want to configure.
  3. Navigate to Variables: In the left-hand menu, click Variables.
  4. Create a New Variable:
    • Click New under User-Defined Variables.
    • Name your variable (e.g., User Type Variable).
    • Select the variable type based on where your data comes from (e.g., First Party Cookie, Data Layer Variable, JavaScript Variable).
    • Configure the variable settings and click Save.
B. Create a New Tag
  1. Navigate to Tags: In the left-hand menu, click Tags.
  2. Create a New Tag:
    • Click New.
    • Name your tag (e.g., Custom Dimension Tag).
    • Click on Tag Configuration and select Google Analytics: Universal Analytics.
    • Select Track Type: For custom dimensions and metrics, you typically use Pageview or Event.
    • Enter your Tracking ID.
  3. Custom Dimensions and Metrics:
    • In the Tag Configuration under More Settings, click Custom Dimensions.
    • Click + Add Custom Dimension.
    • Enter the Index Number you noted earlier and select the variable you created.
    • For Custom Metrics, click Custom Metrics and add the index number and corresponding variable.
  4. Triggering:
    • Click Triggering and choose when the tag should be fired (e.g., All Pages, specific events).
  5. Save the Tag: Click Save to save the tag configuration.

3. Setting Up Triggers

  1. Navigate to Triggers: In the left-hand menu, click Triggers.
  2. Create a New Trigger:
    • Click New.
    • Name your trigger (e.g., User Type Trigger).
    • Select the trigger type (e.g., Page View, Click, Form Submission).
    • Define the conditions for the trigger.
    • Click Save.

4. Testing and Publishing

A. Preview and Debug
  1. Enter Preview Mode: In the top right, click Preview to enter debug mode.
  2. Test Your Setup: Go to your website, perform actions that should trigger your tags, and ensure the custom dimensions and metrics are being sent to Google Analytics.
  3. Check Debug Console: In the GTM debug console, verify that your tags are firing correctly and data is being collected.
B. Publish Your Container
  1. Exit Preview Mode: Click Leave Preview in GTM.
  2. Publish Changes: Click Submit in the top right corner.
  3. Add Version Name and Description: Enter a name and description for this version of your container.
  4. Publish: Click Publish.

5. Verifying in Google Analytics

  1. Log in to Google Analytics.
  2. Navigate to Real-Time Reports: Check real-time reports to ensure that custom dimensions and metrics are being recorded.
  3. Custom Reports: Create custom reports to analyze the data collected through custom dimensions and metrics.

Setting up and tracking custom dimensions and metrics in Google Tag Manager involves configuring both Google Analytics and GTM. By following these steps, you can tailor your analytics setup to collect data specific to your business needs, providing deeper insights into user behavior and improving your overall data-driven decision-making processes. Regularly test and verify your setup to ensure accurate data collection. 

SIIT Courses and Certification

Full List Of IT Professional Courses & Technical Certification Courses Online
Also Online IT Certification Courses & Online Technical Certificate Programs