A tag is snippet of JavaScript that sends information to a third party, such as Google. If you don't use a tag management solution such as Google Tag Manager, you need to add these snippets of JavaScript directly to the source code of your site. In contrast, with Google Tag Manager, you no longer need to maintain each of these JavaScript snippets in your source code; instead, you specify the tags that you want to fire, and when you want them to fire, in the Google Tag Manager user interface.
In Google Tag Manager, you can deploy a tag via a template for the specific tag, or, if a template is not available for the tag you want to deploy, via a custom tag into which you can place your tag JavaScript. Google Tag Manager offers:
- templates for supported Google tags
- templates for certified vendor tags
- custom tag types for all other tags
Templates for Supported Google Tags
Google Tag Manager explicitly supports the following tag types, with templates that minimize the possibility of errors in your tags.
Google Ads Conversion Tracking Tag
To set up this tag in Google Tag Manager, you'll need to supply the Conversion ID, Conversion Label, and Conversion Value.
- In your Google Ads account, navigate to Tools and Analysis > Conversions. Click the Code tab.
- Select an action name on the left and select "I make changes to the code". In the code box:
- Find the value of "google_conversion_id = " and enter it into Conversion ID.
- Find the value of "google_conversion_label = " and enter it into Conversion Label.
- (Optional) Find the value of "google_conversion_value = " and enter it into Conversion Value. If you'd like to populate a value dynamically, select a variable from the dropdown menu (or create a new one).
Add a rule so that the tag fires on your desired conversion page. Name the rule after the conversion page; for example, "PDF Download Conversion Page”. This will allow you to easily identify and reuse the rule in other tags.
Learn more about Google Ads Conversion Tracking.
Floodlight Counter Tag
The Floodlight Counter tag allows you to count the number of times that users have visited a particular page after seeing or clicking one of your ads. There are two ways to add Floodlight tags to a container:
- accept a tag that has been pushed from the Campaign Manager 360 user interface
- add the tag from the Google Tag Manager user interface.
Accepting a Pushed Floodlight Tag
This tag can be pushed directly to your container from the Campaign Manager 360 user interface. To allow this in Google Tag Manager, you need to approve the link request and pushed tag(s). Read Approvals to learn more. To learn how to push tags from Campaign Manager 360, read Add Floodlight activities to Google Tag Manager containers.
To accept a pushed Floodlight tag, navigate to Approval Queue > Tags. Click the activity name. A few of the parameters (e.g. the values for "src= ", "type= ", and "cat= ") will be pre-set.
Floodlight custom variables are key-values that can be used to track data that you collect about your users, for example the genre of movie that a user purchases. Custom Floodlight variables use the keys u1=, u2=, etc. For pushed tags, variable names will be pre-populated in the custom variable fields; you will need to configure these variables the retrieve the appropriate data.
Make desired modifications to the tag, then click Approve.
Adding the Tag in Google Tag Manager
Select Floodlight Counter as the Tag Type.
- Find the value of "src= " and enter it into Advertiser ID.
- Find the value of "type= " and enter it into Group Tag String.
- Find the value of "cat= " and enter it into Activity Tag String.
Floodlight custom variables are key-values that can be used to track data that you collect about your users, for example the genre of movie that a user purchases. Custom Floodlight variables use the keys u1=, u2=, etc. For each custom variable, select a variable that contains the value you want to pass to the variable.
Once you have completed entering the tag information, click Save.
Learn more about the Floodlight Counter tag.
Floodlight Sales Tag
The Floodlight Sales tag allows you to keep track of how many items users have purchased, as well as the total value of those purchases. There are two ways to add Floodlight tags to a container:
- accept a tag that has been pushed from the Campaign Manager 360 user interface
- add the tag from the Google Tag Manager user interface.
Accepting a Pushed Floodlight Tag
This tag can be pushed directly to your container from the Campaign Manager 360 user interface. To allow this in Google Tag Manager, you need to approve the link request and pushed tag(s). Read Approvals to learn more. To learn how to push tags from Campaign Manager 360, read Add Floodlight activities to Google Tag Manager containers.
To accept a pushed Floodlight tag, navigate to Approval Queue > Tags. Click the activity name. A few of the parameters (e.g. the values for "src= ", "type= ", and "cat= ") will be pre-set.
For pushed tags, the Revenue parameter is pre-populated with a {{cost}} variable. You'll need to create and configure a {{cost}} variable that retrieves the revenue amount.
Also, the Order ID parameter is pre-populated with a {{ord}} variable. You'll need to create and configure an {{ord}} variable. This variable should retrieve the order ID (or, if Item Sold is the Counting Method, a count of the number of items sold.)
Floodlight custom variables are key-values that can be used to track data that you collect about your users, for example the genre of movie that a user purchases. Custom Floodlight variables use the keys u1=, u2=, etc. For pushed tags, variable names will be pre-populated in the custom variable fields; you will need to configure these variables the pull the appropriate data.
Make desired modifications to the tag, then click Approve.
Adding the Tag in Google Tag Manager
SelectFloodlight Sales as the Tag Type.
- Find the value of "src= " and enter it into Advertiser ID.
- Find the value of "type= " and enter it into Group Tag String.
- Find the value of "cat= " and enter it into Activity Tag String.
For the Revenue parameter, select a variable that contains the revenue amount. For Order ID, select a variable that contains the order ID. If you have selected Item Sold as the Counting Method, select a variable that contains a count of the number of items sold. You will need to create these variables in Google Tag Manager if you have not already created them.
Floodlight custom variables are key-values that can be used to track data that you collect about your users, for example the genre of movie that a user purchases. Custom Floodlight variables use the keys u1=, u2=, etc. For each custom variable, select a variable that contains the value you want to pass to the variable.
Once you have completed entering the tag information, click Save.
Learn more about the Floodlight Sales tag.
Google Analytics Tag
To find the Web Property ID:
- In your Google Analytics account, navigate to Admin.
- Click Property Settings.
Enter the Tracking ID (which takes the form of G-xxxxxx-xx) into the Web Property ID field.
You can also use a variable in the Web Property ID field, which is helpful if you're managing multiple Google Analytics properties.
To enable Display Advertising features, including Demographics and Interest Reports, Remarketing, and Campaign Manager 360 Integration, select the Display Advertiser Support checkbox. If you select this option, review the Policy requirements for Display Advertising.
Google Tag Manager supports the following Google Analytics tags:
- Page View, the basic Google Analytics tag that should fire on every page of the site.
- Event, used to track a specific action or event, such as a button click.
- Cross-domain Tracking for Link, deprecated: use Decorate Link instead.
- Cross-domain Tracking for Form Post, deprecated: use Decorate Form instead.
- Transaction, used to track an ecommerce transaction.
- Social, used to track social interactions.
- Timing, used to track loading speeds on your site.
- Decorate Link, see Cross Domain Tracking for usage example.
- Decorate Form, see Cross Domain Tracking for usage example.
You have the option of providing additional settings (under More Settings):
- Basic Configuration
- Campaign Tracking:
- Custom Variables: info
- Domains and Directories:info
For example, when tracking across domains A.com to B.com, you would need to configure B.com to use the cookie data from the URL parameter (from the A.com session), instead of setting/using its own cookies. To enable this linking, select the Allow Linker checkbox. - Search Engines and Referrers: info
- Advanced Configuration:
- Tracker Name: Allows you to name the tracker object yourself. Note: Naming the tracker object yourself is discouraged. If you inadvertently reuse an existing tracker object name, your data may become corrupted. Although providing a name for the tracker can allow you to share state between Google Tag Manager-created trackers and your pre-existing Google Analytics code, you should instead update the code on your site to use the Google Tag Manager dataLayer syntax. Otherwise you will be unable to configure your tracking via Google Tag Manager.
- Local GIF Path: info
- Visitor Cookie Timeout: info
- Hit Callback: The value of this field should point to a variable that will return a function. This function will be called when the Google Analytics tracking beacon is completely sent.
- Enable Enhanced Link Attribution: info
- Enable Browser Tracking Module: info
- Enable Flash Detection: info
- Enable Title Detection: info
- Send Hits to Google Servers: If you set a local GIF path, hits will be sent to a server that you own. Selecting this option will also send hits to Google.
Basic Tracking
For basic Google Analytics tracking, add a single Google Analytics tag and select "Page View” as the track type. Add a rule to fire the tag on all pages. If basic tracking is all you need, you’ll just add this single Google Analytics tag. However, if you track events or ecommerce transactions, you’ll need to add additional Google Analytics tags.
Tracking Google Analytics Events
Read Google Analytics Events for examples.
Tracking Across Domains
Read Cross Domain Tracking for examples.
GDN Remarketing Tag
To set up the Google Display Network remarketing tag in Google Tag Manager, you'll need to supply the Conversion ID and Conversion Label.
- In your Google Ads account, click the Campaigns tab.
- In your campaign list on the left, click Shared library > Audiences.
- Find the list created for you, called "Main List." Then, click [Tag] under the "Tags/Definitions" column.
- Click the "Tag" link. In the code box:
- Find the value of "google_conversion_id = " and enter it into the Conversion ID field.
- Find the value of "google_conversion_label = " and enter it into Conversion Label field.
Read Setting Up Google Ads Dynamic Remarketing for detailed instructions. Learn more about the remarketing tag.
Templates for Certified Vendor Tags
In addition to the templates for Google tags, templates for many 3rd party tags are also available. To use a template, simply select it, provide the requested details, and Google Tag Manager automatically generates the correct code. Learn more about certified vendor tags.
Additional 3rd-party tags are available at the Community Template Gallery.
Custom Tag Types
The following two custom tag types are provided, which allow you to copy and paste code from virtually any tag. If you need to implement a tag that is not explicitly supported via a template, you can use one of these tag types.
Custom Image Tag
The Custom Image Tag type allows you to manage an image tag that is not listed as a Tag Type option. For example, if you use an invisible one-pixel image for tracking, enter the image URL. To insert variables, wrap the variable name in double braces, i.e. {{variable_name}}. Select "//" if protocol-relative versions of the image are available; select "https://” if only a secure version is available. "http://" is not recommended.
Select the Cache Buster checkbox and provide a cache busting parameter to ensure that hits are registered from browsers that have cached versions of the image.
Custom HTML Tag
The Custom HTML Tag type allows you to manage a tag that isn't explicitly supported via a Google Tag Manager template, for example, a non-Google tag. (Learn about tag restrictions.)
Copy and paste your HTML/Javascript into the textbox. Be sure to enclose Javascript snippets inside HTML script tags. You may incorporate calls to document.write() in your tags.
To insert variables into your custom HTML tag, wrap the variable name in double braces, i.e. {{variable_name}}. This can be helpful for tag reuse in multiple contexts.
Add tags independently instead of combining them. For example, if you have two data collection tools side by side in your original site code, break these two tools into two separate Custom HTML tags. Doing so will allow you to independently deploy each tag.
Specify rules for when the tag should fire. Once you name and save the tag, you'll be able to manage it using Google Tag Manager.