Google Universal Analytics (analytics.js) Tag Setup Guide
This article describes how to configure the Google Universal Analytics tag in your iQ Tag Management account.
As of July 1, 2023, Google Universal Analytics properties stopped processing hits. This tag has been deprecated and no longer available in the tag marketplace. For the current tag, see Google Analytics 4.
Google Analytics (analytics.js) introduces a set of features that change the way data is collected and organized in your Google Analytics account.
Tag tips
- For more information about Google Analytics (analytics.js), see About Universal Analytics.
- To use the Tealium implementation for this tag, use mapping instead of Google API functions
- For display advertising support information, see About Advertising Features.
- Automatically-generated tracker names take the format of
tealium_X
for the number of accounts defined.
Tag configuration
Navigate to the Tag Marketplace to add a new tag. Read the Tag Overview article for general instructions on how to add a tag.
When adding the tag, configure the following settings:
- Title
- Required.
- Enter a descriptive title to identify the tag instance.
- Tracking ID
- Required.
- Enter the tracking ID of your Google Universal Analytics (GUA) account.
- Each property you track in Google Analytics has a unique Property Tracking ID.
- Example: UA-12345678-1
- Use a comma-separated list to send data for multiple properties.
- Tracker Name
- Optional.
- Use this configuration if you have, or plan to have, multiple trackers.
- Each account ID or GUA property you want to send data to needs to have an associated tracker name.
- Required when you have more than one copy of this tag running per page.
- Use a comma-separated list for multiple Tracker Names (for multiple account tracking), which should be the same length as the list you entered for Tracking IDs above.
- Dashes (-) are not supported in Tracker Names.
- Domain
- Optional.
- Set this value to only allow tracking for a specific domain.
- Enter your domain name for your site.
- Leave this field blank to have Google Analytics auto-detect the domain.
- This configuration sets the domain of the cookie that GUA uses to identify the site visitor.
- If you want to enable tracking across shared sub-domains, omit the ‘www.’ prefix of the domain, for example www.tealium.com would be tealium.com. If you want to specifically track sub-domains separately, enter the entire domain address (e.g. www.tealium.com).
- Global Object
- Not required for most implementations.
- The name of the Global Object used for the event queue,.
- If not specified “ga” is used.
- Cross-Tracking Domains
- Optional.
- Cross-Domain Tracking must be set to true for this list to be used.
- A comma-separated list of domains to use with Cross-Domain Tracking (setAllowLinker).
- You must use the fully-qualified domain name, such as “my.tealiumiq.com”, not the top level domain “tealiumiq.com”.
- Cross-Domain Tracking
- Optional.
- Select On to enable cross-domain tracking.
- A comma-separated list of domains to use with Cross-Domain Tracking (setAllowLinker).
- Sets the value for “setAllowLinker” and enables the cross-domain tracking plugin.
- One or more domains must be specified in the “Cross-Tracking Domains” field or mapped to “crossDomainTrack” to use this feature.
- Transport
- Specifies the transport mechanism with which hits are sent.
- Enhanced Ecommerce
- Optional.
- Use the default value (false) if you are not sure.
- Setting to true enables enhanced e-commerce functionality.
- Mapping E-Commerce actions are required for the following actions:
product_click
detail
add
remove
checkout
checkout_option
promo_click
refund
- For more information, see the Google Enhanced E-Commerce documentation.
- For more information about how to setup enhanced E-Commerce actions through Tealium iQ Tag Management, see Google Universal Analytics Tag: Enhanced E-Commerce.
- Enhanced Link Attribution
- Optional.
- When enabled, a request will be made for
linkid.js
on each page. - Use the default (false) if you are not sure.
- Setting to true enables enhanced link link-tracking functionality.
- Display Advertising Features
- Optional.
- Enables Google Analytics to collect data about your traffic via the DoubleClick cookie in addition to data collected through the standard Google Analytics implementation.
- Select On to enable GUA to collect data about your traffic via the DoubleClick cookie, in addition to data collected through your standard GUA implementation.
- Track Screen Views
- Optional.
- Select On to enable GUA’s App/Screen tracking functionality.
- When enabled, a separate screenview request will be sent after the initial pageview.
- Enabling allows this tag to track the content that visitors viewed using an app.
- Anonymize IP
- Optional.
- Select On to set the last portion of the visitor IP address to zeros before sending it to the GUA data collection network, which allows you to comply with privacy policies.
- Tells Google Analytics to anonymize the information sent by the tracker objects by removing the last octet of the IP address prior to its storage.
- This will slightly reduce the accuracy of geographic reporting.
- Enable create before Extensions
- Optional.
- Select On to enable to initialize Tracking ID using GA’s “create” method before extensions run.
- Not applicable when Tracking ID is configured via mapping.
- Autofill E-Commerce values
- Optional.
- Populates product name, unit price and quantity, if not defined.
- If you do not want the E-Commerce mappings to be altered, you may turn OFF this setting.
- Auto Send Events
- Optional.
- If enabled, a default custom event is generated for the following Enhanced E-Commerce actions:
product_click
add
remove
checkout_option
promo_click
- Enable Optimizely Integration
- Optional.
- Enables automatic GA tracking for Optimizely experiments.
- Select On if you want the tag to track your Optimizely experiments.
- Clear Vars
- Clears items, usually set for the lifetime of the tracker, after each tracking request.
- Applies only to single page applications.
- The default value is Off.
- Use AMP Client ID
- The Google AMP Client ID allows you to uniquely identify users that engage with your content on AMP and non-AMP pages.
- Select On to enable.
- If you opt-in, Google Analytics uses the AMP Client ID to determine that multiple site events belong to the same user when those users visit AMP pages via a Google AMP viewer.
Load rules
Load the tag on all pages or set conditions for when your tag will load. For more information about load rules, see the Load Rules documentation.
Analytics tags such as Google Universal Analytics are intended to be loaded on all pages, so the default All Pages load rule should be selected.
Data mappings
Mapping is the process of sending data from a data layer variable to the corresponding destination variable of the vendor tag. For instructions on how to map a variable to a tag destination, see Data Mappings.
- If you are tracking e-commerce data, then we recommend that you add and configure the E-Commerce Extension. Mapping to e-commerce destinations in the mapping toolbox overrides the e-commerce extension’s mappings.
- For Google Analytics, additional mapping is not required for basic page tracking. The tag automatically tracks basic page data. Event tracking, campaign tracking, social interaction measurement, content groups, and custom variables are not automatically sent; you must map these manually.
For more information on mapping to Google Universal Analytics, see the Google Universal Analytics Tag: Advanced Mapping article.
The available categories are:
Standard
Variable | Description |
---|---|
tid |
|
name |
|
page |
|
title |
|
location |
|
uid |
|
transport |
|
cookieDomain |
|
cookieExpires |
|
legacyCookieDomain |
|
legacyHistoryImport |
|
nonInteraction |
|
enhancedLinkAttribution |
|
allowLinker |
|
crossDomainTrack |
|
siteSpeedSampleRate |
|
sampleRate |
|
autofill_params |
|
optimizely |
|
init_before_extensions |
|
sessionControl |
|
anonymizeIp |
|
dataSource |
|
clear_global_vars |
|
clientId |
|
useAmpClientId |
|
set.### |
|
Event
Variable | Description |
---|---|
eventCategory |
|
eventAction |
|
eventLabel |
|
eventValue |
|
ga_events |
|
global_event_cb |
|
standard_event_cb |
|
Campaign
Variable | Description |
---|---|
campaignId |
|
campaignName |
|
campaignSource |
|
campaignMedium |
|
campaignContent |
|
campaignKeyword |
|
Social
Variable | Description |
---|---|
socialNetwork |
|
socialAction |
|
socialTarget |
|
E-Commerce
Variable | Description |
---|---|
order_id |
|
affiliation |
|
revenue |
|
shipping |
|
tax |
|
App / Screen Tracking
Variable | Description |
---|---|
screenView |
|
appName |
|
appId |
|
appVersion |
|
appInstallerId |
|
screenName |
|
exception_reason |
|
Content Groups
Variable | Description |
---|---|
content_group1 |
Content Group 1 |
content_group2 |
Content Group 2 |
content_group3 |
Content Group 4 |
content_group4 |
Content Group 4 |
content_group5 |
Content Group 5 |
Dimensions
Variable | Description |
---|---|
dimension1 |
Dimension 1 |
dimension2 |
Dimension 2 |
dimension3 |
Dimension 3 |
dimension4 |
Dimension 4 |
dimension5 |
Dimension 5 |
dimension6 |
Dimension 6 |
dimension7 |
Dimension 7 |
dimension8 |
Dimension 8 |
dimension9 |
Dimension 9 |
dimension10 |
Dimension 10 |
dimension11 |
Dimension 11 |
dimension12 |
Dimension 12 |
dimension13 |
Dimension 13 |
dimension14 |
Dimension 14 |
dimension15 |
Dimension 15 |
dimension16 |
Dimension 16 |
dimension17 |
Dimension 17 |
dimension18 |
Dimension 18 |
dimension19 |
Dimension 19 |
dimension20 |
Dimension 20 |
– Premium Dimension– | |
dimension21 - dimension200 |
Dimension 21 through Dimension 100 |
Metrics
Variable | Description |
---|---|
metric1 |
Metric 1 |
metric2 |
Metric 2 |
metric3 |
Metric 3 |
metric4 |
Metric 4 |
metric5 |
Metric 5 |
metric6 |
Metric 6 |
metric7 |
Metric 7 |
metric8 |
Metric 8 |
metric9 |
Metric 9 |
metric10 |
Metric 10 |
metric11 |
Metric 11 |
metric12 |
Metric 12 |
metric13 |
Metric 13 |
metric14 |
Metric 14 |
metric15 |
Metric 15 |
metric16 |
Metric 16 |
metric17 |
Metric 17 |
metric18 |
Metric 18 |
metric19 |
Metric 19 |
metric20 |
Metric 20 |
– Premium Metric– | |
metric21 - metric200 |
Metric 21 through Metric 200 |
Enhanced E-Commerce
Variable | Description |
---|---|
enh_action |
|
enh_event_cb |
|
enh_checkout_step |
|
enh_checkout_option |
|
order_id |
|
affiliation |
|
revenue |
|
shipping |
|
tax |
|
coupon |
|
product_id |
|
product_name |
|
product_category |
|
product_brand |
|
product_variant |
|
product_unit_price |
|
product_quantity |
|
product_discount |
|
product_action_list |
|
product_position |
|
Enh E-Comm: Impressions/Promo
Variable | Description |
---|---|
enh_impression_id |
|
enh_impression_name |
|
enh_impression_category |
|
enh_impression_brand |
|
enh_impression_variant |
|
enh_impression_price |
|
enh_impression_list |
|
enh_impression_position |
|
enh_promo_id |
|
enh_promo_name |
|
enh_promo_creative |
|
enh_promo_position |
|
Vendor documentation
This page was last updated: July 17, 2023