Peter Howley of Google Analytics and Google Tag Manager Certified Partner Empirical Path trained the ABQ Web Geeks web professionals group on the free Google Tag Manager
2. ABOUT US
â Web analytics, market research and campaign
measurement consulting
â Founded in Washington DC in 2002
â Atlanta, NM and DC offices
â Founders Harvard and Georgia Tech MBAs
â Consultants came from Bain, CNN.com,
washingtonpost.com, Yale.edu, Advertising.com
3. About Us: Clients
â Media & Publishing
â Financial Services
â Ecommerce
â Business-to-Business
â Government & Not-for-Profit
â Agencies
4. About Us: Alliances & Tools
â Web analytics
â Conversion optimization
â Tag management
â Testing
â APIs
â Heat maps
â Dashboarding
5. Peter Howley
âLeads Reporting Practice
â MBA from Harvard Business School
â Google Analytics Individual Qualification
Previously:
â Led web analytics at washingtonpost.com
â Advertising.com
â Strategy consultancy Bain & Company
Expertise:
â Web analytics strategy
â Data visualization
â Media, government, B2B sectors
Jim Snyder
âLeads Analytics Implementation Practice
â MBA from Georgia Tech
â Google Analytics Individual Qualification
Previously:
â Data foundataion at Weather.com
â Yale University
â Launch team for CNN.com
Expertise:
â Tag management
â Mobile analytics
â CRM integration
â Healthcare, media, higher ed, tech sectors
About Us: Team
6. Patrick McWilliams
â Tag Management & Integration Lead
Previously:
â Led E-commerce integrations at Tealium
Platforms:
â Google Tag Manager
â Tealium
â Segment
â Mixpanel
â Google Analytics
Expertise:
â Tag management
â CRM integration
â Javascript development
â Ecommerce sector
Justin Marciszewski
â Data Reporting, Analysis & Interpretation
Previously:
â Principal Data Analyst at Harbor Island Analytics
â Co-Founder of Sweetmetrics
Platforms:
â Google Analytics
â R
â MySQL/SQL
â BigQuery
â Klipfolio
Expertise:
â Data warehousing
â Data mining & statistical analysis
â Ecommerce, publishing sectors
â A/B split testing
About Us: Team
8. â Deployment mechanism to load:
â DOM content
â javaScript
â Supports a number of built-in integrations
â Supports infinite number of customized integrations via custom image and HTML containers
Overview
9. â Automation of almost all tags:
â GA
â Events, Custom Vars/Dims, Virtual Pageviews, etc.
â Other Analytics
â AdWords & DoubleClick
â Other ad tags
â Notably not split testing
â Faster implementation
â Does not require technical resources to add, remove, modify tags
â Speeds up site by firing only needed tags through Rules
â Greater flexibility to track and target key segments
Benefits
10. â Launched in Q4 2012
â GA Classic, Adwords, Doubleclick
â Managing JS
â Auto Event Tracking Q4 2013
â Listen for on-page events
â Eliminates need for most hard-coding
â v2 released in Q3 2015
â Event listeners already enabled box checks
â Greater flexibility to track and target key segments
History
11. â Developer Guide
â https://developers.google.com/tag-manager/
â Help Center
â https://support.google.com/tagmanager/?hl=en
â Tag Manager Official Website
â http://tagmanager.google.com
Documentation
12. â Container
â JavaScript code block you should add on every page
â Tags
â Javascript, iFrame, image DOM elements that add some function to a site
â Triggers (Rules)
â User-defined action that will cause a specific tag to be loaded on the page
â Listeners
â Every click, link click and form submission is automatically âlistenedâ for, once enabled
â Data Layer
â Object that contains all of the information that you want to pass to Google Tag Manager
Building Blocks
13. â Container Size
â The container size limit is ~ 200K
â The number of tags is roughly limited to 200
â Consolidation
â Consider consolidating tags, rules and variables
â For example - have a look-up table to handle
Special Considerations
14. Old way: add once,
then again with each
upgrade or
customization
New way: add once &
only once across all
pages
Implementation
16. â GTM enables management of Google and third-party
tags in its interface
âBoth versions of GA
â Each Tag fires based on one or more Rules
âTypically based on page URL or Element
clicked
âCan be based on events like time passing
or user clicks
âBoolean logic
â Tags can use data in Macros to send details to GA
âE.g., built-in Macro can pass URL of
downloaded file as Event Label
Tags
24. Creating Tags: Adwords Tags
From var
google_conversion_
id =
From var
google_conversion_
label =
â In AdWords 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 "var
google_conversion_id = ". Enter the
number you find into the
google_conversion_id field on this page.
âIn the code box, find "var
google_conversion_label = ". Enter the
number you find into the
google_conversion_label field on this
page
26. â The rule(s) attached to a tag govern when the tag is
fired or not fired
âTag must have at least one rule in order
to fire
âRules are evaluated during runtime and
associated tags are fired when conditions
are met
â A Trigger is composed of one or more conditions
âEach condition takes the form: [Variable]
[Operator] [Value]
Triggers
29. Triggers
Link ends in PDF
Operator types:
equals
contains
starts with
ends with
matches CSS selector
matches RegEx
matches RegEx (ignore case)
does not equal
does not contain
does not start with
does not end with
does not match CSS selector
does not match RegEx
does not match RegEx (ignore case)
less than or equal to
greater than
greater than or equal to
List of all Variables
32. Variables
â Name-value pairs for which the value is populated
during runtime
âE.g., predefined Variable âurlâ has value
of the current page URL
â GTM has predefined Variables
âEnable creation of the most commonly
needed Tags and Triggers
âYou can create additional Variables to
suit specific requirements
Variable
types
33. â Uses
âEnable Triggers that are based on
dynamic conditions
âPass values from one Tag to another
during runtime
â Tips
âSince Variables can help many Triggers
and Tags, name descriptively
âSelect the Variable Type that tells GTM
where to find the Variable value at
runtime
â (e.g. JavaScript Variable, DOM Attribute).
Variable can
âpipe inâ label
Variable can
define a Trigger
Variables
34. Enable Built-In Variables
Enable these to
âlistenâ for types of
clicks
Enable these to
âlistenâ for types of
Form submissions
For Ajax sites with no
change in URLs
37. â Cons:
â As the site changes your tracking breaks
if youâre depending on it to track key
actions
â Pros:
â Easy to configure right out of box
â Donât have to bother developers
â Best Practice:
â Build out a site tagging guide for
developers for key site actions because
your site WILL change
Scraping
47. âTrack user activity on pages separately from
pageviews
â Any Flash-driven element, like a website
or Movie player
â Embedded AJAX page elements
â Page gadgets
â File downloads
â Clicks on links to other domains
â Load times for data
âCorrect Bounce Rate by defining visits with these
user activities as not Bounces
Events
Variable can
âpipe inâ
Parameters
Can also be
strings
48. âTo track pageview-like activity related to content
not already tracked as Pageviews
â Best to use when part of navigation-
driven elements on your site
â Example: form confirmation page that is
has the same URL as the form itself and
needs to be differentiated in GA
â Add to Pageview total
Virtual Pageviews
Type in âpageâ;
donât use Variable
of that name
Form the URI to
appear in GA via
Variables and
strings
49. â Integration of DoubleClick with GA enables:
â Demographics reports in GA
â Retargeting to GA Segments in AdWords
â Google Display Network impressions in
GA
â Requires
â Change to Privacy Policy
â Change to GA Tracking Code
Display Ad Features
Links to Privacy
Policy guidance
50. Custom Dimensions
â Show visitor activity by custom segments created by
modifying GTM
â E.g. Generation Users, (potentially
Practice Users, Leads not yet signed
up).
â 20 Custom Dimensions in (UA Upgrade required)
â Use name-value pair tags in GTM to refine tracking
â Traits become another Dimension in GA that can:
â Be a Secondary Dimension in most
reports
â Be added to a Custom Report
â Be the basis of a Custom Segment
â Custom Dimensions CAN be the basis
of views and Filters
51. â Visitor
â the client that visits the site, such as the browser or mobile phone operated by a person
â e.g., Customers that purchased a subscription. Differentiate from non-subscribers
â Session
â the period of time during which the visitor is active on the site
â e.g., visits that included making a comment on an article. How many average do per session?
â Hit
â activity on the user's behalf which sends a GIF request to the Analytics servers
â Product
â Requires Enhanced E-Commerce
â Metadata about a purchase
â e.g. Out Of Stock SKU,
â Combined with Product Revenue to compare
Custom Dimension Scope
53. âGA is designed to track single domains in
individual Properties
âMultiple domains can share a
Property ID and Views
âBut by default, each visit that views
more than one domain is counted
as:
â 2 visits
â by 2 unique visitors
â with 1 visit reported as referred from the
first domain
âA Tag customization is required to integrate
such visits into one session
âExamples
âCross-subdomain
â www.client.com > blog.client.com
â www.client.com > cart.client.com
âCross-domain
â www.client.com > www.client-blog.com
â www.client.com > www.client.co.uk
â www.client.com > client.cart-vendor.com
Subdomain & Cross Domain Tracking
54. âCross-domain Tracking
â Use the Linker plugin on all domains
â define all domains to be linked
â this will decorate all links with the proper
parameters
â On each site/domain, set allowLinker to
true
â Create Views for each domain
â filter by hostname
â exclude all linked domains to prevent self referrals
â Create a Rollup View of all domains
Comma-
separated list of
domains
Subdomain & Cross Domain Tracking
55. â Enhanced Funnels Analysis
â Attribution to Promotions and Banners
â Accounting for Refunds
â Product Impressions and Clicks
Added to Cart Purchased
Got
Refunded
Promotion
Viewed
Product
Impression
Viewed
Product Detail Viewed
Checkout
Started
Billing Shipping Payment Review
Product
Clicked
Promotion
Clicked
Enhanced Ecommerce
56. GTM Configuration Ecommerce Data Layer (Usually on Thank You Page)
Enhanced Ecommerce
Box Check to
enable Enhanced
Ecommerce
Data from
transaction
passed into GTM
Variables that are
passed into the E-
commerce script
58. â Google Tag Manager functions best when deployed alongside a data layer
â Is an object that contains all of the information that you want to pass to Google Tag Manager.
â Ensures maximum flexibility, portability, and ease of implementation
â Passes information such as events or variables to Google Tag Manager
â Avoids referencing variables, transaction information, page categories, and other important
signals scattered throughout page
â Explicitly declaring the data layer is optional
â Can still access values from the page using the the Variables feature
â Can not use events without the data layer
â The data layer:
â Uses W3C data layer standard
â Can be defined on page load
â Can be appended on event actions
â Can use other standards and transform in GTM
â Can be populated from on-page variables or DOM elements
Data Layer
59. â Data Layer Variables
â Must be above Container code on page
â Data Layer with HTML Event Handlers
â Instead of using dataLayer.push() for
each variable and event, you can push
multiple variables and events at once
Data Layer
60. Social Tag (on your site)
Data Layer
DataLayer for
Thank You Page
GTM Snippet -
goes on EVERY
PAGE
62. â No longer have to base Rules on GTM Events fired by Listeners
â gtm.linkClick
â gtm.click
â gtm.formSubmit
Auto-Event Tracking
63. Auto-Event Tracking: Listeners
â No longer required to add listeners
â Instead add a Trigger with the type of listener you
want
â Click
â Form
â History Change (VPV)
â JS Error
â Timer
â Custom
65. â Implement to Mobile SDK to manage tracking codes
on mobile apps
â Also manages configuration values
â that you want to change in the future
â that can change conditionally
â Instead of defining constant values in your
mobile app,
â Examples:
â dimensions and locations of ads served in your
application
â game settings
â user interface settings, such as differences between
platforms
â localized strings determined by device language
Mobile
67. â Added to page dataLayer for control & security
â Able to block or allow
â specific tags or macros
â classes of objects (groups of tags, triggers,
and variables that have the same
capabilities)
â Rules that govern whitelists and blacklists:
â When a whitelist has been set, relevant
tags, triggers, and variables will only
execute if they are in the whitelist
â When a blacklist has been set, tags,
triggers, and variables will only execute if
they are not in the blacklist
â When both have been set, blacklists take
precedence
Blacklists and Whitelists
68. â Available tags, triggers, and variables, their types, and the classes that they belong to
Blacklists and Whitelists
69. â Available classes and their
relationships to other classes
â The Whitelisted Automatically
column represents the list of
classes that will be implicitly
whitelisted when the class from
that row is whitelisted
â Blacklisted Automatically
column represents the list of
classes that will be implicitly
blacklisted when the class from
that row is blacklisted.
Blacklists and Whitelists
71. â Previewing
â See site & tags via unpublished version of
container
â No need to create a version first with Quick
Preview
â Debug mode
â See an additional GTM debugging overlay
to site
â Share
â Get link to send to non-GTM users
â They can preview and debug container
without login to GTM
Troubleshooting & Validation
73. â WASP Chrome Extension debugs GTM dataLayer to show GTM Events
â gtm.linkClick
â gtm.click
â gtm.timer
â Details common Triggering hooks for each
â elementTarget
â elementUrl
WASP Chrome
Extension
Troubleshooting & Validation