This article describes how to set up the Google Analytics (gtag.js) tag in your Tealium iQ Tag Management account.

Google Analytics provides APIs to collect, configure, and report on user-interactions with your online content. Using gtag.js lets you benefit from the latest tracking features and integrations as they become available.

In this article:

Tag Tips

  • Use mappings to:
    • Dynamically override the E-Commerce extension values
    • Setup event triggers
    • Add custom Metrics, Dimensions, and Content Groups
  • Replace cst in custom event variables with your desired event name
  • Supports the following E-Commerce extension values:
    • Order ID
    • Order Total
    • Shipping Amount
    • Tax Amount
    • Store
    • Promo Code
    • Customer ID
    • List of Product IDs
    • List of Names
    • List of Brands
    • List of Categories
    • List of Prices
    • List of Quantities
    • List of Discounts

Tag Configuration

First, go to Tealium's tag marketplace and add the Google Analytics (gtag.js) tag (Learn more about how to add a tag).

After adding the tag, configure the following settings:

  • Tracking ID
    • Tracking ID of the Google Analytics property to which you want to send data
      Example: UA-XXXXXX-13
      Use a comma-separated list to send data for multiple properties. 

      Enable App + Web by including the measurement ID in the Tracking ID value. 
      For example; UA-XXXXXX-13,G-XXXXXXXXXX

  • Global Object
    • The name of the Global Object used for the event queue.
    • If not specified, "gtag" is used.
    • Not required for most implementations.
  • Cross-Tracking Domains
    • A comma-separated list of domains to use with Cross-Domain Tracking (setAllowLinker).
    • To use this list, Cross-Domain Tracking must be set to true.
    • Should be the top level domain, such as tealiumiq.com.
  • Cross-Domain Tracking
    • Sets the value for setAllowLinker and enables the cross-domain tracking plug-in.
    • To use this feature, one or more domains must be specified in the "Cross-Tracking Domains" field or be mapped to crossDomainTrack.
  • Transport Type
    • Specifies the transport mechanism with which hits are sent.
  • Allow Advertising Features
    • Enables Google Analytics to collect data about your traffic via the Google Ad Manager (DoubleClick) cookie, in addition to data collected through the standard Google Analytics implementation.
    • Setting this to Off disables all advertising, reporting, and remarketing features, overrides any property settings established in the Google Analytics user interface.
  • Enhanced Link Attribution
    • If unsure, use the default value (false).
    • Google Analytics provides enhanced link attribution to improve the accuracy of report data by automatically differentiating between multiple links to the same URL on a single page and using link element IDs.
  • Track Screen Views
    • Enables App/Screen tracking.
    • When enabled, a separate screenview request is sent after the initial pageview.
  • Anonymize IP
    • 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.
    • Slightly reduces the accuracy of geographic reporting.
  • Clear Vars
    • Clears items usually set for the lifetime of the tracker after each tracking request.
  • Optimize Container ID
    • Sets the optimize_id and enables the Google Optimize plug-in.
    • This ID is found in your Optimize accounts page.
    • Example: GTM-XXXXXX
  • 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.
    • 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.
  • Data Layer Name
    • By default, the data layer initiated and referenced by the global site tag is named dataLayer.
    • Only rename the data layer if your project requires a separate name.
  • Allow Anchor
    • When true, the _ga parameter is added to the query portion of the URL rather than the anchor portion ("#").

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.

The available categories are:

Standard

Variable Description
tracking_id
  • Tracking ID
  • Tracking ID of the Google Analytics property to which you want to send data
  • Example: UA-XXXXXX-13
  • Use a comma-separated list to send data for multiple properties.
transport_type
  • Transport type
page_title
  • Page Title
page_location
  • Page Location

page_path

  • Page Path
cookie_name
  • Cookie Name

cookie_domain

  • Cookie Domain

cookie_expires

  • Cookie Expires
cookie_prefix
  • Cookie prefix
cookie_update
  • Cookie update
config.linker.accept_incoming
  • Boolean
  • Cross-Domain Tracking
  • Sets the value for setAllowLinker and enables the cross-domain tracking plug-in.
  • To use this feature, one or more domains must be specified in the "Cross-Tracking Domains" field or be mapped to crossDomainTrack.
config.linker.domains
  • Array
  • Cross-Tracking Domains
  • A comma-separated list of domains to use with Cross-Domain Tracking (setAllowLinker).
  • To use this list, Cross-Domain Tracking must be set to true.
  • Should be the top level domain, such as tealiumiq.com.
allow_ad_personalization_signals
  • Boolean
  • Allow ad personalization signals.
  • Enables Google Analytics to collect data about your traffic via the Google Ad Manager (DoubleClick) cookie, in addition to data collected through the standard Google Analytics implementation.
config.link_attribution.cookie_name
  • Link Attribution Cookie Name
config.link_attribution.cookie_expires
  • Link Attribution Cookie Expiration
config.link_attribution.levels
  • Link Attribution Levels
config.campaign.id
  • Campaign ID
config.campaign.name
  • Campaign Name
config.campaign.source
  • Campaign Source
config.campaign.medium
  • Campaign Medium
config.campaign.content
  • Campaign Content
config.campaign.term
  • Campaign Term/Keyword
config.anonymize_ip
  • Boolean
  • Anonymize IP
  • 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.
  • Slightly reduces the accuracy of geographic reporting.
clear_global_vars
  • Boolean
  • Clear Vars
  • Clears items usually set for the lifetime of the tracker after each tracking request.
config.optimize_id
  • Optimize Container ID
  • Sets the optimize_id and enables the Google Optimize plugin.
  • This ID is found in your Optimize accounts page.
  • Example: GTM-XXXXXX
config.use_amp_client_id
  • Boolean
  • 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.
  • 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.

config.sample_rate

  • Sample Rate
config.site_speed_sample_rate
  • Site Speed Sample Rate
customer_id
  • User ID
  • Overrides _ccustid
config.client_id
  • Client ID

Event

Variable Description

event_name

  • Event Action

event.event_category

  • Event Category

event.event_label

  • Event Label

event.value

  • Event / Timing Value

event.name

  • Timing Variable Name

event.description

  • Exception Description

event.non_interaction

  • Non-Interaction
event.fatal
  • Boolean
  • Fatal Error

event.search_term

  • Search Term

event.method

  • Method

event.content_type

  • Content Type

event.content_id

  • Content ID

event.destination

  • Destination
event.start_date
  • Start Date
  • Date format is YYYYMMDD.
event.end_date
  • End Date
  • Date format is YYYYMMDD.

event.custom

  • Custom Event Data
event.anonymize_ip
  • Boolean
  • Anonymize IP
  • 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.
  • Slightly reduces the accuracy of geographic reporting.

event.send_to

  • Override Default Routing

event.event_callback

  • Event callback

App / Screen Tracking

Variable Description
screen_view
  • Boolean
  • Track Screen Views
  • Enables App/Screen tracking.
  • When enabled, a separate screenview request is sent after the initial pageview.

event.screen_name

  • Screen Name

config.app_name

  • Application Name

config.app_id

  • Application ID

config.app_version

  • Application Version
IDconfig.app_installer_id
  • Application Installer

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-- 0
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-- 0
metric21 - metric200 Metric 21 through Metric 200

Enhanced E-Commerce

Variable Description
code>checkout_step
  • Number
  • Checkout step.

checkout_option

  • Checkout Option.
order_currency
  • Currency
  • Overrides _ccurrency.
code>order_id
  • Transaction ID
  • Overrides _corder.
order_total
  • Value/Order Total
  • Overrides _ctotal.

order_shipping

  • Shipping Amount
  • Overrides _cship.
order_tax
  • Tax Amount
  • Overrides _ctax.
order_store
  • Affiliation/Store
  • Overrides _cstore.

order_coupon_code

  • Promo Code/Coupon
  • Overrides _cpromo.
customer_id
  • User ID
  • Overrides _ccustid.
product_id
  • Array
  • List of IDs
  • Overrides _cprod.
product_name
  • Array
  • List of Names
  • Overrides _cprodname.
product_brand
  • Array
  • List of Brands
  • Overrides _cbrand.
product_category
  • Array
  • List of Categories
  • Overrides _ccat.
product_variant
  • Array
  • List of Variants
product_unit_price
  • Array
  • List of Prices
  • Overrides _cprice.
product_quantity
  • Array
  • List of Quantities
  • Overrides _cquan.
product_discount
  • Array
  • List of Discounts
  • Overrides _cdisc.
product_promo_code
  • Array
  • List of Promo Codes/Coupons
product_action_list
  • Array
  • Product Action List
product_list_name
  • Array
  • Product Name
product_list_id
  • Product List ID
product_list_position
  • Array
  • Product Position
product_location_id
  • Product Location ID

Enh E-Comm: Engagement

Variable Description
impression_id
  • Array
  • Product Impression ID
impression_name
  • Array
  • Product Impression Name

impression_category

  • Array
  • Product Impression Category
impression_brand
  • Array
  • Product Impression Brand
impression_variant
  • Array
  • Product Impression Variant
impression_price
  • Array
  • Product Impression Price
impression_list_name
  • Array
  • Product Impression List
impression_list_position
  • Array
  • Product Impression Position
promo_id
  • Array
  • Promotion ID
promo_name
  • Array
  • Promotion Name
promo_creative_name
  • Array
  • Promotion Creative

promo_creative_slot

  • Array
  • Promotion Position

App+Web Travel

Variable Description
event.trip_type
  • Trip Type
start_date
  • Array
  • Start Date
end_date
  • Array
  • End Date
origin
  • Array
  • Origin
destination
  • Array
  • Destination
flight_number
  • Array
  • Flight Number
travel_class
  • Array
  • Travel Class
fare_product
  • Array
  • Fare Product
booking_code
  • Array
  • Booking Code
event.passengers.total
  • Total Number of Passengers
event.passengers.adult
  • Number of Adult Passengers
event.passengers.child
  • Number of Child Passengers
event.passengers.infant_in_lap
  • Number of Infant Passengers in Lap
event.passengers.infant_in_seat
  • Number of Infant Passengers in Seat

App+Web Game

Variable Description
event.achievement_id
  • Achievement ID
event.character
  • Character
event.group_id
  • Group ID
event.item_name
  • Item Name
event.level
  • Level
event.level_name
  • Level Name
event.score
  • Score
event.success
  • Success
event.virtual_currency_name
  • Virtual Currency Name
Version history
Revision #:
15 of 15
Last update:
‎06-03-2020 09:14 AM
Updated by: