SlideShare ist ein Scribd-Unternehmen logo
1 von 158
Downloaden Sie, um offline zu lesen
GOOGLE TAG MANAGER
ULTIMATE CRASH COURSE
#MnSummit @mike_arnesen | upbuild.io
#MnSummit @mike_arnesen | upbuild.io
WHO AM I?
#MnSummit @mike_arnesen | upbuild.io
— @MIKE_ARNESEN
"I’M THAT GUY
YOU KNOW FROM
THE INTERNET!"
#MnSummit @mike_arnesen | upbuild.io
at UpBuild
FOUNDER/CEO
#MnSummit @mike_arnesen | upbuild.io
at UpBuild
FOUNDER/CEO
#MnSummit @mike_arnesen | upbuild.io
in the
REAL WORLD
MASSIVE GEEK
#MnSummit @mike_arnesen | upbuild.io
GET THIS DECK
BIT.LY/GTM-CRASH-COURSE
CRASH COURSE!
THIS WILL BE A
#MnSummit @mike_arnesen | upbuild.io
#MnSummit @mike_arnesen | upbuild.io
THIS IS A CRASH COURSE
IF YOU WANT A BETTER UNDERSTANDING
OF THE FUNDAMENTALS,
YOU'RE IN THE RIGHT PLACE.
#MnSummit @mike_arnesen | upbuild.io
THIS IS A CRASH COURSE
IF YOU ALREADY KNOW GTM
AND WANT TO LEARN ADVANCED TACTICS,
YOU'RE ALSO IN THE RIGHT PLACE.
#MnSummit @mike_arnesen | upbuild.io
THIS IS A CRASH COURSE
IF YOU'RE HOPING TO
LEARN HOW TO DO THINGS
YOU DIDN'T EVEN KNOW YOU COULD DO,
YOU'RE IN THE RIGHT PLACE!
#MnSummit @mike_arnesen | upbuild.io
I WANT YOU
TO GET TAKEAWAYS
#MnSummit @mike_arnesen | upbuild.io
TAG MANAGEMENT?
WHAT IS
TAG MANAGEMENT?
#MnSummit @mike_arnesen | upbuild.io
TAG MANAGER:
A SOLUTION FOR MANAGING WEBSITE TAGS
THROUGH A CENTRAL INTERFACE DECOUPLED
FROM THE SOURCE CODE OF THE WEBSITE.
 
* TECHNICAL DEFINITION
#MnSummit @mike_arnesen | upbuild.io
TAG MANAGER:
A WAY TO ADD CODE TO YOUR THING
WITHOUT CHANGING YOUR THING.
* SIMPLIFIED DEFINITION
YOUR PORTAL
INTO THE SOURCE CODE!
#MnSummit @mike_arnesen | upbuild.io
#MnSummit @mike_arnesen | upbuild.io
A WARP ZONE
TO SKIP THE HARD PARTS!
THE ULTIMATE HACK
TO OVERRIDE THE SYSTEM!
#MnSummit @mike_arnesen | upbuild.io
#MnSummit @mike_arnesen | upbuild.io
BY THE POWER 

OF GTM
ADD, CHANGE, OR
REMOVE TAGS
What
#MnSummit @mike_arnesen | upbuild.io
tagmanager.google.com
BY THE POWER 

OF GTM
IN A
WEB INTERFACE
Where
#MnSummit @mike_arnesen | upbuild.io
BY THE POWER 

OF GTM
USING A SMALL
SNIPPET OF
JAVASCRIPT CODE
How
#MnSummit @mike_arnesen | upbuild.io
BY THE POWER 

OF GTM
BECAUSE IT SOLVES
ALL OUR PROBLEMS!
Why?
#MnSummit @mike_arnesen | upbuild.io
PROBLEMS?
WHAT PROBLEMS?
#MnSummit @mike_arnesen | upbuild.io
– Marketing Manager
“We love that idea, 

but realistically it's not going to
happen until next quarter. 

We've run out of development
budget."
#MnSummit @mike_arnesen | upbuild.io
– Business Owner
“I know you checked last week, 

but our outsourced dev thinks the
semantic markup implementation 

is right this time. Can you check?"
#MnSummit @mike_arnesen | upbuild.io
–Director of Marketing
“Our new homepage went live 

this morning and we noticed that
analytics stopped working. 

How hard is that to fix?"
#MnSummit @mike_arnesen | upbuild.io
– Marketing Strategist
“We need to have this new pop-up
asking for donations on our site by
the end of the week. 

I don't think it's going to happen,
but do you have any ideas?"
#MnSummit @mike_arnesen | upbuild.io
– Marketers
“Why is everything on fire?"
#MnSummit @mike_arnesen | upbuild.io
– Marketers
“Why is everything on fire?"
#MnSummit @mike_arnesen | upbuild.io
THE DECK CAN SEEM LIKE
IT’S STACKED AGAINST US
#MnSummit @mike_arnesen | upbuild.io
THE DECK CAN SEEM LIKE
IT’S STACKED AGAINST US
WHY MUST LIFE
BE SO HARD?!
#MnSummit @mike_arnesen | upbuild.io
THE DECK CAN SEEM LIKE
IT’S STACKED AGAINST US
WHY MUST I FAIL
AT EVERY ATTEMPT
AT MARKETING?!
#MnSummit @mike_arnesen | upbuild.io
GOOGLE TAG MANAGER
SOLVES ALL OUR PROBLEMS!*
#MnSummit @mike_arnesen | upbuild.io
GOOGLE TAG MANAGER
SOLVES ALL OUR PROBLEMS!*
* Well, a lot of things
#MnSummit @mike_arnesen | upbuild.io
GOOGLE TAG MANAGER
SOLVES ALL OUR PROBLEMS!*
* Well, a lot of things ** Your mileage may vary
#MnSummit @mike_arnesen | upbuild.io
— All of us, I hope
"But how?!"
BASIC COMPONENTS
OF GTM
#MnSummit @mike_arnesen | upbuild.io
Tags
Triggers
Variables
#MnSummit @mike_arnesen | upbuild.io
TAGS
THE WORKERS,
THE MOVERS & SHAKERS,
THE STARS OF THE SHOW
#MnSummit @mike_arnesen | upbuild.io
TAGS
Common Tags
• UA Page View — Page View
• UA Event Tracking — Events
• AdWords — Conversion Tracking
• Facebook Pixel — Custom HTML
• LinkedIn — Insights
• DoubleClick — Floodlight Counter
#MnSummit @mike_arnesen | upbuild.io
TRIGGERS
EVERY TAG
NEEDS A TRIGGER
#MnSummit @mike_arnesen | upbuild.io
TRIGGERS
Common Triggers
• All Pages — on Page View
• All Pages — on Window Loaded
• Some Pages — Matching Certain Paths
• Link Clicks — Matching Certain Attributes
• Form Submission — Matching Certain Forms
• Custom Event — DataLayer Events
#MnSummit @mike_arnesen | upbuild.io
VARIABLES
ANY DATA SUBJECT TO
CHANGE.
MOST TRIGGERS LEVERAGE
SOME TYPE OF VARIABLE.
#MnSummit @mike_arnesen | upbuild.io
VARIABLES
Common Variables
• Page Path, URL , & Hostname — Built-Ins
• Google Analytics Tracking ID — Constant
• Click Classes & Click IDs — Built-In
• Click Element — For CSS Selection
• Form ID — Built-In
• GA Settings — Settings Configuration
BY THE
POWER OF JAVASCRIPT
#MnSummit @mike_arnesen | upbuild.io
GOOGLE TAG MANAGER
IS AN ABSTRACTION OF JAVASCRIPT
#MnSummit @mike_arnesen | upbuild.io
#MnSummit @mike_arnesen | upbuild.io
FROM GTM INTERFACE
Tag
Trigger
Variable
#MnSummit @mike_arnesen | upbuild.io
TO JAVASCRIPT CODE
$(document).ready(
function() {
ga('create', 'UA-XXXXX-Y', 'auto');
ga('send','pageview',

location.pathname);
}
)
Tag
Trigger
Variable
Variable
#MnSummit @mike_arnesen | upbuild.io
TO JAVASCRIPT CODE
$(document).ready(
function() {
ga('create', 'UA-XXXXX-Y', 'auto');
ga('send','pageview',

location.pathname);
}
)
Tag
Trigger
Variable
Variable
Sorry, purists. jQuery is way easier to look at.
#MnSummit @mike_arnesen | upbuild.io
TO JAVASCRIPT
THE CAUSE OF,
AND SOLUTION TO,
ALL OF LIFE’S PROBLEMS
#MnSummit @mike_arnesen | upbuild.io
LIMITATIONS OF GTM
IT’S A CLIENT-SIDE APPLICATION
#MnSummit @mike_arnesen | upbuild.io
SERVER-SIDE
RUNS ON A SERVER
BEFORE IT GETS
TO THE BROWSER
#MnSummit @mike_arnesen | upbuild.io
CLIENT-SIDE
RUNS IN A USER’S BROWSER
AFTER INITIAL DELIVERY
#MnSummit @mike_arnesen | upbuild.io
AJAX
Asynchronous
JavaScript and XML
#MnSummit @mike_arnesen | upbuild.io
AJAX
Asynchronous
JavaScript and XML
JSON!
ENTER, 

THE DATALAYER
#MnSummit @mike_arnesen | upbuild.io
#MnSummit @mike_arnesen | upbuild.io
DATALAYER
MAKE IMPORTANT DATA
AVAILABLE TO YOUR
CLIENT-SIDE APPLICATION
Server
Client
DataLayer
#MnSummit @mike_arnesen | upbuild.io
DATALAYER
SLIDE THINGS THROUGH
TO THE OTHER SIDE OF
THE BULLETPROOF GLASS
Server
Client
DataLayer
#MnSummit @mike_arnesen | upbuild.io
GET THE
DATA OUT
OF THERE!
BECAUSE BEING
TRAPPED ON
THE WRONG SIDE OF
THE GLASS SUCKS
#MnSummit @mike_arnesen | upbuild.io
Client
THE
DATALAYER
IS VERSATILE
IT CAN BE USED TO
PASS DATA FROM THE
SERVER THROUGH
TO THE CLIENT
ServerDataLayer
#MnSummit @mike_arnesen | upbuild.io
Client
THE
DATALAYER
IS VERSATILE
OR PUSH CLIENT-SIDE
DATA INTO AN EASY-
TO-ACCESS POCKET
ServerDataLayer
#MnSummit @mike_arnesen | upbuild.io
DATALAYER BASICS
<script>
  dataLayer = [];
</script>
Goes ABOVE your
GTM snippet!
#MnSummit @mike_arnesen | upbuild.io
DATALAYER BASICS
<script>
  dataLayer = [{
    'userType': 'registered',
    'lifetimeValue': 108.00,
  }];
</script>
Pass through data from
your server
#MnSummit @mike_arnesen | upbuild.io
DATALAYER BASICS
<script>
  dataLayer = [{
    'userType': 'registered',
    'lifetimeValue': 108.00,
  }];
</script>
#MnSummit @mike_arnesen | upbuild.io
DATALAYER BASICS
<script>
  dataLayer = [{
    'userType': 'registered',
    'lifetimeValue': 108.00,
  }];
</script>
#MnSummit @mike_arnesen | upbuild.io
ADVANCED DATALAYER
<script>
  dataLayer.push({
  'event': 'KPI Event',
  'eventCategory': 'nav click',
  'eventAction': 'about us'
});  
</script>
Pass in
your own data
#MnSummit @mike_arnesen | upbuild.io
HOW TO USE GTM
LIKE A PRO
IMPRESS YOUR COWORKERS
#MnSummit @mike_arnesen | upbuild.io
HOW TO USE GTM
LIKE A PRO
IMPRESS YOUR COWORKERS
IMPRESS YOUR FRIENDS
#MnSummit @mike_arnesen | upbuild.io
HOW TO USE GTM
LIKE A PRO
IMPRESS YOUR COWORKERS
IMPRESS YOUR FRIENDS
IMPRESS YOUR SIGNIFICANT OTHER
#MnSummit @mike_arnesen | upbuild.io
MY BEST 

GTM PRO TIPS
#MnSummit @mike_arnesen | upbuild.io
MY BEST GTM PRO TIPS
1. Track Clicks, the basic way
2. Track Clicks, the UpBuild way
3. Page-Level Custom Dimensions
4. Implement JSON-LD, at scale
5. Analyze Form Abandonment
6. VPVs for Single-Page Experiences
7. Make Website Changes, without
developers
8. Recruiting Technical Talent, bonus!
#MnSummit @mike_arnesen | upbuild.io
MY BEST GTM PRO TIPS
1. Track Clicks, the basic way
2. Track Clicks, the UpBuild way
3. Page-Level Custom Dimensions
4. Implement JSON-LD, at scale
5. Analyze Form Abandonment
6. VPVs for Single-Page Experiences
7. Make Website Changes, without
developers
8. Recruiting Technical Talent, bonus!
#MnSummit @mike_arnesen | upbuild.io
MY BEST GTM PRO TIPS
1. Track Clicks, the basic way
2. Track Clicks, the UpBuild way
3. Page-Level Custom Dimensions
4. Implement JSON-LD, at scale
5. Analyze Form Abandonment
6. VPVs for Single-Page Experiences
7. Make Website Changes, without
developers
8. Recruiting Technical Talent, bonus!
#MnSummit @mike_arnesen | upbuild.io
MY BEST GTM PRO TIPS
1. Track Clicks, the basic way
2. Track Clicks, the UpBuild way
3. Page-Level Custom Dimensions
4. Implement JSON-LD, at scale
5. Analyze Form Abandonment
6. VPVs for Single-Page Experiences
7. Make Website Changes, without
developers
8. Recruiting Technical Talent, bonus!
#MnSummit @mike_arnesen | upbuild.io
MY BEST GTM PRO TIPS
1. Track Clicks, the basic way
2. Track Clicks, the UpBuild way
3. Page-Level Custom Dimensions
4. Implement JSON-LD, at scale
5. Analyze Form Abandonment
6. VPVs for Single-Page Experiences
7. Make Website Changes, without
developers
8. Recruiting Technical Talent, bonus!
#MnSummit @mike_arnesen | upbuild.io
MY BEST GTM PRO TIPS
1. Track Clicks, the basic way
2. Track Clicks, the UpBuild way
3. Page-Level Custom Dimensions
4. Implement JSON-LD, at scale
5. Analyze Form Abandonment
6. VPVs for Single-Page Experiences
7. Make Website Changes, without
developers
8. Recruiting Technical Talent, bonus!
#MnSummit @mike_arnesen | upbuild.io
MY BEST GTM PRO TIPS
1. Track Clicks, the basic way
2. Track Clicks, the UpBuild way
3. Page-Level Custom Dimensions
4. Implement JSON-LD, at scale
5. Analyze Form Abandonment
6. VPVs for Single-Page Experiences
7. Make Website Changes, without
developers
8. Recruiting Technical Talent, bonus!
#MnSummit @mike_arnesen | upbuild.io
MY BEST GTM PRO TIPS
1. Track Clicks, the basic way
2. Track Clicks, the UpBuild way
3. Page-Level Custom Dimensions
4. Implement JSON-LD, at scale
5. Analyze Form Abandonment
6. VPVs for Single-Page Experiences
7. Make Website Changes, without
developers
8. Recruiting Technical Talent, bonus!
#MnSummit @mike_arnesen | upbuild.io
Goal: Understand which clickable
elements get the most (or least)
use. Optimize accordingly.
TRACK CLICKS
#MnSummit @mike_arnesen | upbuild.io
Goal: Understand which clickable
elements get the most (or least)
use. Optimize accordingly.
Approach: Tell GTM to listen for
clicks on the elements we care
about and then send readable
data to Google Analytics.
TRACK CLICKS
#MnSummit @mike_arnesen | upbuild.io
TRACK CLICKS
1. Enable built-In Variables
2. Create new GA (Universal) Tag
3. Create new Trigger
4. Preview (Test), Submit, & Publish
#MnSummit @mike_arnesen | upbuild.io
TRACK CLICKS
1. Enable built-In Variables
2. Create new GA (Universal) Tag
3. Create new Trigger
4. Preview (Test), Submit, & Publish
#MnSummit @mike_arnesen | upbuild.io
TRACK CLICKS
1. Enable built-In Variables
2. Create new GA (Universal) Tag
3. Create new Trigger
4. Preview (Test), Submit, & Publish
#MnSummit @mike_arnesen | upbuild.io
TRACK CLICKS
1. Enable built-In Variables
2. Create new GA (Universal) Tag
3. Create new Trigger
4. Preview (Test), Submit, & Publish
nav > ul > li > a
#MnSummit @mike_arnesen | upbuild.io
1. Enable built-In Variables
2. Create new GA (Universal) Tag
3. Create new Trigger
4. Preview (Test), Submit, & Publish
TRACK CLICKS
#MnSummit @mike_arnesen | upbuild.io
QUICK TESTING FOR SELECTORS
function testSelector (s){
var te = document.querySelectorAll(s),
prettyData = "Includes: ";
for (var i = 0; i < te.length; i++) {
prettyData += te[i].innerHTML
+ " (Link " + (i+1) + ")";
if (i < te.length-1) {
prettyData += ", " }
}
return prettyData;
}
1. Ctrl + Shift + J / Cmd + Option + J in Chrome
2. Copy + Paste
3. type: testSelector('your css');
codepen.io/mike_arnesen/pen/mwMqee/
#MnSummit @mike_arnesen | upbuild.io
QUICK TESTING FOR SELECTORS
#MnSummit @mike_arnesen | upbuild.io
Goal: Understand which clickable
elements get the most (or least) use.
Optimize accordingly.
TRACK CLICKS
The UpBuild Way!
#MnSummit @mike_arnesen | upbuild.io
Goal: Understand which clickable
elements get the most (or least) use.
Optimize accordingly.
Approach: Collect the same data, but…
TRACK CLICKS
The UpBuild Way!
#MnSummit @mike_arnesen | upbuild.io
Goal: Understand which clickable
elements get the most (or least) use.
Optimize accordingly.
Approach: Collect the same data, but…
A. in the most efficient way possible
B. with the fewest GTM tags
C. in a way that scales
TRACK CLICKS
The UpBuild Way!
#MnSummit @mike_arnesen | upbuild.io
1. Create 3 New DataLayer Variables
2. Create a Tag to Send All Event Data
3. Create a Trigger for "KPI Event"
4. Establish an HTML Tag to Manage Click
Tracking
TRACK CLICKS
The UpBuild Way!
#MnSummit @mike_arnesen | upbuild.io
1. Create 3 New DataLayer Variables
2. Create a Tag to Send All Event Data
• use {{dataLayer variables}}
3. Create a Trigger for "KPI Event"
4. Establish an HTML Tag to Manage Click
Tracking
TRACK CLICKS
The UpBuild Way!
#MnSummit @mike_arnesen | upbuild.io
1. Create 3 New DataLayer Variables
2. Create a Tag to Send All Event Data
3. Create a Trigger for "KPI Event"
4. Establish an HTML Tag to Manage Click
Tracking
TRACK CLICKS
The UpBuild Way!
#MnSummit @mike_arnesen | upbuild.io
1. Create 3 New DataLayer Variables
2. Create a Tag to Send All Event Data
3. Create a Trigger for "KPI Event"
4. Establish an HTML Tag to Manage Click
Tracking
TRACK CLICKS
The UpBuild Way!
#MnSummit @mike_arnesen | upbuild.io
ADVANCED CLICK TRACKING
<script>
// Primary navigation
jQuery("nav > ul > li >
a").each(function(index) {
jQuery(this).click(function() {
dataLayer.push({
'event': 'KPI Event',
'eventCategory': 'Navigation',
'eventAction': 'Primary Nav Click',
'eventLabel': jQuery("nav > ul > li
> a")[index].text.toLowerCase()
});
});
});
</script>
1. Find a selector for the tracked element
2. Define your data labeling
3. Use jQuery to build dynamic event values
codepen.io/mike_arnesen/pen/OgjOXb
#MnSummit @mike_arnesen | upbuild.io
ADVANCED CLICK TRACKING
<script>
// Dropdown nav items
jQuery(".sub-menu > li >
a").each(function(index) {
jQuery(this).click(function() {
dataLayer.push({
'event': 'KPI Event',
'eventCategory': 'Navigation',
'eventAction': 'Dropdown Nav Click',
'eventLabel': jQuery(".sub-menu > li
> a")[index].text.toLowerCase()
});
});
});
</script>
4. Add a new block for each KPI group
5. Put everything within one <script> tag.
codepen.io/mike_arnesen/pen/OgjOXb
#MnSummit @mike_arnesen | upbuild.io
Goal: Enable GA segmentation by
page attributes like author,
publication month, word count, etc.
PAGE-LEVEL CUSTOM DIMENSIONS
#MnSummit @mike_arnesen | upbuild.io
Goal: Enable GA segmentation by
page attributes like author,
publication month, word count, etc.
Approach: Use GTM variables to
harvest on-page information and
pass in back with our analytics
page view tag.
PAGE-LEVEL CUSTOM DIMENSIONS
#MnSummit @mike_arnesen | upbuild.io
1. Create a New Custom Dimension in GA
2. Create a New "DOM Element" Variable,
based on the CSS selector of attribute
3. Update your GA Settings variable to set
the Custom Dimension based on the
Variable from Step 2
PAGE-LEVEL CUSTOM DIMENSIONS
upbuild.io/blog/track-post-publish-date-custom-dimension-google-analytics/
#MnSummit @mike_arnesen | upbuild.io
1. Create a New Custom Dimension in GA
2. Create a New "DOM Element" Variable,
based on the CSS selector of attribute
3. Update your GA Settings variable to set
the Custom Dimension based on the
Variable from Step 2
PAGE-LEVEL CUSTOM DIMENSIONS
upbuild.io/blog/track-post-publish-date-custom-dimension-google-analytics/
#MnSummit @mike_arnesen | upbuild.io
1. Create a New Custom Dimension in GA
2. Create a New "DOM Element" Variable,
based on the CSS selector of attribute
3. Update your GA Settings variable to set
the Custom Dimension based on the
Variable from Step 2
PAGE-LEVEL CUSTOM DIMENSIONS
upbuild.io/blog/track-post-publish-date-custom-dimension-google-analytics/
#MnSummit @mike_arnesen | upbuild.io
Goal: Improve SEO by delivering
structured data to Googlebot in
JSON-LD format
IMPLEMENT JSON-LD
#MnSummit @mike_arnesen | upbuild.io
Goal: Improve SEO by delivering
structured data to Googlebot in
JSON-LD format
Approach: Use GTM variables to
harvest on-page information (a lot of
it), assemble everything in a JSON-
LD template, and make available to
Google.
IMPLEMENT JSON-LD
#MnSummit @mike_arnesen | upbuild.io
1. Map out all the data points you need
2. Create a new "DOM Element" (or "Custom
JavaScript") variable for each
3. Get a JSON-LD template from schema.org
4. Replace placeholder values with
{{variables}}
5. Place within a <script> that outputs
indexable JSON-LD
IMPLEMENT JSON-LD
moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
#MnSummit @mike_arnesen | upbuild.io
1. Map out all the data points you need
2. Create a new "DOM Element" (or "Custom
JavaScript") variable for each
3. Get a JSON-LD template from schema.org
4. Replace placeholder values with
{{variables}}
5. Place within a <script> that outputs
indexable JSON-LD
IMPLEMENT JSON-LD
moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
#MnSummit @mike_arnesen | upbuild.io
1. Map out all the data points you need
2. Create a new "DOM Element" (or "Custom
JavaScript") variable for each
3. Get a JSON-LD template from schema.org
4. Replace placeholder values with
{{variables}}
5. Place within a <script> that outputs
indexable JSON-LD
IMPLEMENT JSON-LD
moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
#MnSummit @mike_arnesen | upbuild.io
1. Map out all the data points you need
2. Create a new "DOM Element" (or "Custom
JavaScript") variable for each
3. Get a JSON-LD template from schema.org
4. Replace placeholder values with
{{variables}}
5. Place within a <script> that outputs
indexable JSON-LD
IMPLEMENT JSON-LD
moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
#MnSummit @mike_arnesen | upbuild.io
1. Map out all the data points you need
2. Create a new "DOM Element" (or "Custom
JavaScript") variable for each
3. Get a JSON-LD template from schema.org
4. Replace placeholder values with
{{variables}}
5. Place within a <script> that outputs
indexable JSON-LD
IMPLEMENT JSON-LD
moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
#MnSummit @mike_arnesen | upbuild.io
1. Map out all the data points you need
2. Create a new "DOM Element" (or "Custom
JavaScript") variable for each
3. Get a JSON-LD template from schema.org
4. Replace placeholder values with
{{variables}}
5. Place within a <script> that outputs
indexable JSON-LD
IMPLEMENT JSON-LD
moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
#MnSummit @mike_arnesen | upbuild.io
6. Get rich snippets!
• Take over world.
IMPLEMENT JSON-LD
moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
#MnSummit @mike_arnesen | upbuild.io
Goal: Understand when users stop
filling out forms to improve form fill
conversion rate.
FORM ABANDONMENT
#MnSummit @mike_arnesen | upbuild.io
Goal: Understand when users stop
filling out forms to improve form fill
conversion rate.
Approach: Use GTM to deliver
JavaScript that will progressively log
interactions and, upon
abandonment, send a record to GA.
FORM ABANDONMENT
#MnSummit @mike_arnesen | upbuild.io
1. Modify the sample script
2. Create a new analytics tag in GTM
3. Create three new DataLayer
variables
FORM ABANDONMENT
#MnSummit @mike_arnesen | upbuild.io
1. Modify the sample script
2. Create a new analytics tag in GTM
3. Create three new DataLayer
variables
FORM ABANDONMENT
#MnSummit @mike_arnesen | upbuild.io
1. Modify the sample script
2. Create a new analytics tag in GTM
3. Create three new DataLayer
variables
FORM ABANDONMENT
#MnSummit @mike_arnesen | upbuild.io
1. Modify the sample script
2. Create a new analytics tag in GTM
3. Create three new DataLayer
variables
4. Use your existing Click Tracking tag
& DataLayer variables
FORM ABANDONMENT
#MnSummit @mike_arnesen | upbuild.io
1. Modify the sample script
2. Create a new analytics tag in GTM
3. Create three new DataLayer
variables
4. Use your existing Click Tracking tag
& DataLayer variables
FORM ABANDONMENT
Learn more
JavaScript!
#MnSummit @mike_arnesen | upbuild.io
FORM ABANDONMENT
<script>
var formSelector = "#wpcf7-f511-p15-o1 >
form";
var submitSelector = ".wpcf7-submit";
var formInteractions = [];
var attribute = "name";
var pagePath = window.location.pathname;
...
1. Specify your form selector
2. Specify a submit selector
3. Specify the attr you want as a label
codepen.io/mike_arnesen/pen/gRxorv
#MnSummit @mike_arnesen | upbuild.io
FORM ABANDONMENT
...
document.querySelector(formSelector).addEv
entListener("change", function(e) {
var input =
e["target"].getAttribute(attribute);
if (formInteractions[i] !== input) {
formInteractions.push(input);
}
});
... 4. This listens for changes to the form
5. Each change is stored in
"formInteractions"
codepen.io/mike_arnesen/pen/gRxorv
#MnSummit @mike_arnesen | upbuild.io
FORM ABANDONMENT
...
function pushToDataLayer(cause,
formInteractions) {
var prettyPath;
if (formInteractions == "") {
prettyPath = "Nothing set";
} else {
prettyPath = formInteractions.join(" > ");
};
dataLayer.push({
event: "KPI Event",
eventCategory: "Form Abandon Contact Us",
eventAction: prettyPath,
eventLabel: "form abandoned on " + pagePath
+ " triggered by " + cause
});
}
...
6. This lets you push all
interactions to the dataLayer
7. Change "eventCategory" to
suit your needs
codepen.io/mike_arnesen/pen/gRxorv
#MnSummit @mike_arnesen | upbuild.io
FORM ABANDONMENT
...
jQuery(window).on('beforeunload',
function(){
pushToDataLayer("page bounce",
formInteractions);
});
...
8. Before anyone leaves, call pushToDataLayer
function (previous slide)
9. You can provide a custom "cause"
codepen.io/mike_arnesen/pen/gRxorv
#MnSummit @mike_arnesen | upbuild.io
FORM ABANDONMENT
...
jQuery("submitSelector").on("click",
function(){
jQuery(window).off('beforeunload');
});
</script>
10. On submission, remove
abandonment monitoring
codepen.io/mike_arnesen/pen/gRxorv
#MnSummit @mike_arnesen | upbuild.io
Goal: Define checkpoints in single-page
experiences (e.g., one-page checkout,
configurators, wizards, long forms) to
understand how they perform.
VIRTUAL PAGE VIEWS
#MnSummit @mike_arnesen | upbuild.io
Goal: Define checkpoints in single-page
experiences (e.g., one-page checkout,
configurators, wizards, long forms) to
understand how they perform.
Approach: Use GTM to sent page view
info to the dataLayer, fire a dedicated VPV
tag to send info to GA as pageviews, and
set up a traditional GA goal funnel for
analysis.
VIRTUAL PAGE VIEWS
#MnSummit @mike_arnesen | upbuild.io
VIRTUAL PAGE VIEWS
1. Break the process into defined steps.
Decide on virtual titles & URLs
2. Set up the goal in GA
3. Create 2 new "DataLayer" variables
(pagePath & pageTitle)
4. Build new Config variable for VPVs
5. Set up a VPV Analytics Tag
6. Deploy JS that attaches handlers to the
breakpoints and pushes to the dataLayer.
#MnSummit @mike_arnesen | upbuild.io
VIRTUAL PAGE VIEWS
1. Break the process into defined steps.
Decide on virtual titles & URLs
2. Set up the goal in GA
3. Create 2 new "DataLayer" variables
(pagePath & pageTitle)
4. Build new Config variable for VPVs
5. Set up a VPV Analytics Tag
6. Deploy JS that attaches handlers to the
breakpoints and pushes to the dataLayer.
#MnSummit @mike_arnesen | upbuild.io
1. Break the process into defined steps.
Decide on virtual titles & URLs
2. Set up the goal in GA
3. Create 2 new "DataLayer" variables
(pagePath & pageTitle)
4. Build new Config variable for VPVs
5. Set up a VPV Analytics Tag
6. Deploy JS that attaches handlers to the
breakpoints and pushes to the dataLayer.
VIRTUAL PAGE VIEWS
#MnSummit @mike_arnesen | upbuild.io
1. Break the process into defined steps.
Decide on virtual titles & URLs
2. Set up the goal in GA
3. Create 2 new "DataLayer" variables
(pagePath & pageTitle)
4. Build new Config variable for VPVs
5. Set up a VPV Analytics Tag
6. Deploy JS that attaches handlers to the
breakpoints and pushes to the dataLayer.
VIRTUAL PAGE VIEWS
#MnSummit @mike_arnesen | upbuild.io
1. Break the process into defined steps.
Decide on virtual titles & URLs
2. Set up the goal in GA
3. Create 2 new "DataLayer" variables
(pagePath & pageTitle)
4. Build new Config variable for VPVs
5. Set up a VPV Analytics Tag
6. Deploy JS that attaches handlers to the
breakpoints and pushes to the dataLayer.
VIRTUAL PAGE VIEWS
#MnSummit @mike_arnesen | upbuild.io
1. Break the process into defined steps.
Decide on virtual titles & URLs
2. Set up the goal in GA
3. Create 2 new "DataLayer" variables
(pagePath & pageTitle)
4. Build new Config variable for VPVs
5. Set up a VPV Analytics Tag
6. Deploy JS that attaches handlers to the
breakpoints and pushes to the dataLayer
VIRTUAL PAGE VIEWS
#MnSummit @mike_arnesen | upbuild.io
VPV TRACKING
<script>
var vpvData = [
{selector: "#serviceneed >
input[type='submit']",
title: "Create a Project Form - Step 1",
path: "/vpv/create-project/step-01/"},
{selector: "#gform_next_button_1_27",
title: "Create a Project Form - Step 2",
path: "/vpv/create-project/step-02/"},
{selector: "#gform_next_button_1_28",
title: "Create a Project Form - Step 3",
path: "/vpv/create-project/step-03/"}
];
...
1. Define three things for each virtual step
• Selector for click activation, Virtual title,
Virtual page path
codepen.io/mike_arnesen/pen/GEvgww
#MnSummit @mike_arnesen | upbuild.io
VPV TRACKING
...
function pushToDataLayer(i) {
dataLayer.push({
event: "vpv",
pageTitle: vpvData[i].title,
pagePath: vpvData[i].path
});
}

... 2. Write another pushToDataLayer function
codepen.io/mike_arnesen/pen/GEvgww
#MnSummit @mike_arnesen | upbuild.io
VPV TRACKING
...
jQuery(vpvData[0].selector).click(function
(){
pushToDataLayer(0);
});
jQuery(vpvData[1].selector).click(function
(){
pushToDataLayer(1);
});
jQuery(vpvData[2].selector).click(function
(){
pushToDataLayer(2);
})

...
3. Do this for as many steps as you have,
starting at zero.
codepen.io/mike_arnesen/pen/GEvgww
#MnSummit @mike_arnesen | upbuild.io
Goal: Make updates to the website
without having to wait for developers
or use budget prematurely.
UPDATE YOUR WEBSITE
#MnSummit @mike_arnesen | upbuild.io
Goal: Make updates to the website
without having to wait for developers
or use budget prematurely.
Approach: Use GTM to deliver a
custom HTML tag containing site-
modifying JavaScript to update the
site as the page loads.
UPDATE YOUR WEBSITE
#MnSummit @mike_arnesen | upbuild.io
Goal: Make updates to the website
without having to wait for developers
or use budget prematurely.
Approach: Use GTM to deliver a
custom HTML tag containing site-
modifying JavaScript to update the
site as the page loads.
UPDATE YOUR WEBSITE
These changes are
indexable!*
#MnSummit @mike_arnesen | upbuild.io
Goal: Make updates to the website
without having to wait for developers
or use budget prematurely.
Approach: Use GTM to deliver a
custom HTML tag containing site-
modifying JavaScript to update the
site as the page loads.
UPDATE YOUR WEBSITE
These changes are
indexable!*
* usually
#MnSummit @mike_arnesen | upbuild.io
Goal: Make updates to the website
without having to wait for developers
or use budget prematurely.
Approach: Use GTM to deliver a
custom HTML tag containing site-
modifying JavaScript to update the
site as the page loads.
UPDATE YOUR WEBSITE
These changes are
indexable!*
* usually ** your mileage may vary
#MnSummit @mike_arnesen | upbuild.io
Goal: Make updates to the website
without having to wait for developers
or use budget prematurely.
Approach: Use GTM to deliver a
custom HTML tag containing site-
modifying JavaScript to update the
site as the page loads.
UPDATE YOUR WEBSITE
These changes are
indexable!*
* usually ** your mileage may vary *** a lot.
#MnSummit @mike_arnesen | upbuild.io
1. Write your HTML and CSS
2. Determine where you want it on the page
& find a CSS selector for that spot
3. Remove line breaks from your new code
at http://removelinebreaks.net/
4. Deliver another <script> via a GTM HTML
tag on applicable pages
UPDATE YOUR WEBSITE
#MnSummit @mike_arnesen | upbuild.io
1. Write your HTML and CSS
2. Determine where you want it on the page
& find a CSS selector for that spot
3. Remove line breaks from your new code
at http://removelinebreaks.net/
4. Deliver another <script> via a GTM HTML
tag on applicable pages
UPDATE YOUR WEBSITE
#about > .col > .vc_col-sm-6:first
#MnSummit @mike_arnesen | upbuild.io
1. Write your HTML and CSS
2. Determine where you want it on the page
& find a CSS selector for that spot
3. Remove line breaks from your new code
at http://removelinebreaks.net/
4. Deliver another <script> via a GTM HTML
tag on applicable pages
UPDATE YOUR WEBSITE
#MnSummit @mike_arnesen | upbuild.io
1. Write your HTML and CSS
2. Determine where you want it on the page
& find a CSS selector for that spot
3. Remove line breaks from your new code
at http://removelinebreaks.net/
4. Use a <script> to combine your selector
with .append() or .prepend() on
applicable pages
UPDATE YOUR WEBSITE
#MnSummit @mike_arnesen | upbuild.io
CHANGE PAGE CONTENT
jQuery(yourSelector).prepend('<h
1 id="awesomeHeading">How do we
not have an H1 yet?</h1>');
Definitely this easy. ;-)
codepen.io/mike_arnesen/pen/GEvyYX
#MnSummit @mike_arnesen | upbuild.io
Goal: Bury some treasure for
those who might come looking.
Encourage them to apply within.
GEEKY RECRUITING
#MnSummit @mike_arnesen | upbuild.io
Goal: Bury some treasure for
those who might come looking.
Encourage them to apply within.
GEEKY RECRUITING
Approach: Use GTM to print out a
message in the developer console
and link to our jobs page.
#MnSummit @mike_arnesen | upbuild.io
1. Come up with your message
2. Format according to these specs
3. Test in your own console
4. Deploy as a custom tag through GTM
5. Wait for awesome applicants to come
knocking
GEEKY RECRUITING
#MnSummit @mike_arnesen | upbuild.io
1. Come up with your message
2. Format according to these specs
3. Test in your own console
4. Deploy as a custom tag through GTM
5. Wait for awesome applicants to come
knocking
GEEKY RECRUITING
#MnSummit @mike_arnesen | upbuild.io
1. Come up with your message
2. Format according to these specs
3. Test in your own console
4. Deploy as a custom tag through GTM
5. Wait for awesome applicants to come
knocking
GEEKY RECRUITING
#MnSummit @mike_arnesen | upbuild.io
1. Come up with your message
2. Format according to Chrome’s specs
3. Test in your own console
4. Deploy as a custom tag through GTM
5. Wait for awesome applicants to come
knocking
GEEKY RECRUITING
#MnSummit @mike_arnesen | upbuild.io
1. Come up with your message
2. Format according to Chrome’s specs
3. Test in your own console
4. Deploy as a custom tag through GTM
5. Wait for awesome applicants to come
knocking
GEEKY RECRUITING
#MnSummit @mike_arnesen | upbuild.io
PRINT CONSOLE MESSAGES
console.info(
"%cOne of us!! n%cIt looks
like you love poking around in
the console. Us, too!…",
"color: blue; font-size:
25px;text-transform:
uppercase;",
"color: green; font-size:
12px;"
);
codepen.io/mike_arnesen/pen/owepqe
PARTING THOUGHTS
AS WE WRAP UP
#MnSummit @mike_arnesen | upbuild.io
#MnSummit @mike_arnesen | upbuild.io
TACKLE ANY GTM CHALLENGE
1. Define the goal first
2. Determine where in GA you want
data to go
3. Establish a data-labeling convention
4. Understand the available
components & functions
5. Test, fail, learn, repeat
6. Learn more JavaScript
#MnSummit @mike_arnesen | upbuild.io
TROUBLESHOOT
ANYTHING IN GTM
1. Use preview mode liberally
2. Run your code in the dev tools console
3. Is the tag firing too soon or too late?
4. Read blog posts and comment with questions
5. When all else fails, StackOverflow
#MnSummit @mike_arnesen | upbuild.io
QUICK TIPS & TOOLS
1. Cmd + Click to follow links without leaving the
page
2. Use GTM Injector to access preview mode
without having a container live on the site
3. Use GTM Sonar to see how/if clicks & forms
register
4. Scroll Depth Tracking by Parsnip.co
5. YouTube Tracking on Cardinal Path
#MnSummit @mike_arnesen | upbuild.io
DIG DEEPER
1. Google Tag Manager Fundamentals
2. Simo Ahava’s Blog
3. UpBuild’s Blog
4. MeasureSchool on YouTube
#MnSummit @mike_arnesen | upbuild.io
THANK YOU!
GET THIS DECK: BIT.LY/GTM-CRASH-COURSE
READ OUR BLOG: UPBUILD.IO/BLOG
FOLLOW ME: @MIKE_ARNESEN | MIKEARNESEN.COM

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (19)

[TurnDigi 2020] Getting Tech SEO Implemented
[TurnDigi 2020] Getting Tech SEO Implemented[TurnDigi 2020] Getting Tech SEO Implemented
[TurnDigi 2020] Getting Tech SEO Implemented
 
Omi sido-beyond-the-basics-of-website-migration.pptx
Omi sido-beyond-the-basics-of-website-migration.pptxOmi sido-beyond-the-basics-of-website-migration.pptx
Omi sido-beyond-the-basics-of-website-migration.pptx
 
Developing Technical SEO Skills - Brighton SEO Sept 2021
Developing Technical SEO Skills - Brighton SEO Sept 2021Developing Technical SEO Skills - Brighton SEO Sept 2021
Developing Technical SEO Skills - Brighton SEO Sept 2021
 
Enterprise SEO
Enterprise SEOEnterprise SEO
Enterprise SEO
 
AMP Accelerated Mobile Pages - The Next Generation SMX London 2017 Dawn Anderson
AMP Accelerated Mobile Pages - The Next Generation SMX London 2017 Dawn AndersonAMP Accelerated Mobile Pages - The Next Generation SMX London 2017 Dawn Anderson
AMP Accelerated Mobile Pages - The Next Generation SMX London 2017 Dawn Anderson
 
How to rank for quick answers in Google - April 2017 - Adrian Phipps
How to rank for quick answers in Google - April 2017 - Adrian PhippsHow to rank for quick answers in Google - April 2017 - Adrian Phipps
How to rank for quick answers in Google - April 2017 - Adrian Phipps
 
HOW TO INCREASE YOUR TRAFFIC 5X WITH THIS ONE SEO METHOD
HOW TO INCREASE YOUR TRAFFIC 5X WITH THIS ONE SEO METHODHOW TO INCREASE YOUR TRAFFIC 5X WITH THIS ONE SEO METHOD
HOW TO INCREASE YOUR TRAFFIC 5X WITH THIS ONE SEO METHOD
 
3 New Techniques for the Modern Age of SEO
3 New Techniques for the Modern Age of SEO3 New Techniques for the Modern Age of SEO
3 New Techniques for the Modern Age of SEO
 
Driving *Meaningful* Clicks with Enriched SERPs - BrightonSEO 2019
Driving *Meaningful* Clicks with Enriched SERPs - BrightonSEO 2019Driving *Meaningful* Clicks with Enriched SERPs - BrightonSEO 2019
Driving *Meaningful* Clicks with Enriched SERPs - BrightonSEO 2019
 
The inbounder London - 2. May 2017 Tom Anthony
The inbounder London - 2. May 2017  Tom Anthony The inbounder London - 2. May 2017  Tom Anthony
The inbounder London - 2. May 2017 Tom Anthony
 
Searchlove London 2016 - The Changing Landscape of Mobile Search - Bridget Ra...
Searchlove London 2016 - The Changing Landscape of Mobile Search - Bridget Ra...Searchlove London 2016 - The Changing Landscape of Mobile Search - Bridget Ra...
Searchlove London 2016 - The Changing Landscape of Mobile Search - Bridget Ra...
 
SearchLove San Diego 2018 | Will Critchlow | From the Horse’s Mouth: What We ...
SearchLove San Diego 2018 | Will Critchlow | From the Horse’s Mouth: What We ...SearchLove San Diego 2018 | Will Critchlow | From the Horse’s Mouth: What We ...
SearchLove San Diego 2018 | Will Critchlow | From the Horse’s Mouth: What We ...
 
SearchLove London 2016 | Dom Woodman | How to Get Insight From Your Logs
SearchLove London 2016 | Dom Woodman | How to Get Insight From Your LogsSearchLove London 2016 | Dom Woodman | How to Get Insight From Your Logs
SearchLove London 2016 | Dom Woodman | How to Get Insight From Your Logs
 
Rendering SEO Manifesto - Why we need to go beyond JavaScript SEO
Rendering SEO Manifesto - Why we need to go beyond JavaScript SEORendering SEO Manifesto - Why we need to go beyond JavaScript SEO
Rendering SEO Manifesto - Why we need to go beyond JavaScript SEO
 
BrightonSEO 2018 - How to Tighten up Your SEO on Large Websites
BrightonSEO 2018 - How to Tighten up Your SEO on Large WebsitesBrightonSEO 2018 - How to Tighten up Your SEO on Large Websites
BrightonSEO 2018 - How to Tighten up Your SEO on Large Websites
 
BrightonSeo - ecommerce seo pitfalls by Dave Naylor
BrightonSeo - ecommerce seo pitfalls by Dave NaylorBrightonSeo - ecommerce seo pitfalls by Dave Naylor
BrightonSeo - ecommerce seo pitfalls by Dave Naylor
 
Delivering Better Onsite Search Results - Brighton SEO Sep 2018
Delivering Better Onsite Search Results - Brighton SEO Sep 2018Delivering Better Onsite Search Results - Brighton SEO Sep 2018
Delivering Better Onsite Search Results - Brighton SEO Sep 2018
 
How to Improve Your Website's Indexation - Sean Butcher Brighton SEO Present...
How to Improve Your Website's Indexation  - Sean Butcher Brighton SEO Present...How to Improve Your Website's Indexation  - Sean Butcher Brighton SEO Present...
How to Improve Your Website's Indexation - Sean Butcher Brighton SEO Present...
 
Optimising Content For Voice Search & Virtual Assistants
Optimising Content For Voice Search & Virtual AssistantsOptimising Content For Voice Search & Virtual Assistants
Optimising Content For Voice Search & Virtual Assistants
 

Ähnlich wie Google Tag Manager: Ultimate Crash Course - 2017 MnSearch Summit

Critical warning signs your site needs a redesign 031814
Critical warning signs your site needs a redesign 031814Critical warning signs your site needs a redesign 031814
Critical warning signs your site needs a redesign 031814
DemandWave
 

Ähnlich wie Google Tag Manager: Ultimate Crash Course - 2017 MnSearch Summit (20)

TechSEO Boost 2019: Research Competition
TechSEO Boost 2019: Research CompetitionTechSEO Boost 2019: Research Competition
TechSEO Boost 2019: Research Competition
 
Competitive Analysis for SEO - SEMNE
Competitive Analysis for SEO - SEMNE Competitive Analysis for SEO - SEMNE
Competitive Analysis for SEO - SEMNE
 
Level Up Your Analytics at SearchLove London 2017
Level Up Your Analytics at SearchLove London 2017Level Up Your Analytics at SearchLove London 2017
Level Up Your Analytics at SearchLove London 2017
 
Smxl milan 2019 - Apps script for SEO
Smxl milan 2019 - Apps script for SEOSmxl milan 2019 - Apps script for SEO
Smxl milan 2019 - Apps script for SEO
 
AMPed SEO with Mike Arnesen & SEMpdx
AMPed SEO with Mike Arnesen & SEMpdxAMPed SEO with Mike Arnesen & SEMpdx
AMPed SEO with Mike Arnesen & SEMpdx
 
What to do when everything goes wrong
What to do when everything goes wrongWhat to do when everything goes wrong
What to do when everything goes wrong
 
SEO & UX: Finding the Balance - Rob Ousbey
SEO & UX: Finding the Balance - Rob OusbeySEO & UX: Finding the Balance - Rob Ousbey
SEO & UX: Finding the Balance - Rob Ousbey
 
SearchLove San Diego 2017 | Emily Grossman | The New Mobile
SearchLove San Diego 2017 | Emily Grossman | The New MobileSearchLove San Diego 2017 | Emily Grossman | The New Mobile
SearchLove San Diego 2017 | Emily Grossman | The New Mobile
 
How to leverage indexation tracking to monitor issues and improve performance
How to leverage indexation tracking to monitor issues and improve performanceHow to leverage indexation tracking to monitor issues and improve performance
How to leverage indexation tracking to monitor issues and improve performance
 
PPC Best Practices: Getting to Your Bottom 10% By Jim Banks #SEJSummit
PPC Best Practices: Getting to Your Bottom 10% By Jim Banks #SEJSummitPPC Best Practices: Getting to Your Bottom 10% By Jim Banks #SEJSummit
PPC Best Practices: Getting to Your Bottom 10% By Jim Banks #SEJSummit
 
What makes a great engineer [Given at MusesCodeJs in Sydney 07.03.2020]
What makes a great engineer [Given at MusesCodeJs in Sydney 07.03.2020]What makes a great engineer [Given at MusesCodeJs in Sydney 07.03.2020]
What makes a great engineer [Given at MusesCodeJs in Sydney 07.03.2020]
 
Hotel Digital Marketing Snapshot and Budgeting for 2015
Hotel Digital Marketing Snapshot and Budgeting for 2015Hotel Digital Marketing Snapshot and Budgeting for 2015
Hotel Digital Marketing Snapshot and Budgeting for 2015
 
Strategies & Tactics For Overcoming Enterprise SEO Challenges
Strategies & Tactics For Overcoming Enterprise SEO ChallengesStrategies & Tactics For Overcoming Enterprise SEO Challenges
Strategies & Tactics For Overcoming Enterprise SEO Challenges
 
Critical warning signs your site needs a redesign 031814
Critical warning signs your site needs a redesign 031814Critical warning signs your site needs a redesign 031814
Critical warning signs your site needs a redesign 031814
 
Leveraging the powers of Structured Data ✨
Leveraging the powers of Structured Data ✨Leveraging the powers of Structured Data ✨
Leveraging the powers of Structured Data ✨
 
The SEO Justice League: 5 Pillars Worthy of a Great SEO Strategy
The SEO Justice League: 5 Pillars Worthy of a Great SEO StrategyThe SEO Justice League: 5 Pillars Worthy of a Great SEO Strategy
The SEO Justice League: 5 Pillars Worthy of a Great SEO Strategy
 
The Day After Tomorrow: 
When Ad Blockers Stop All Analytics Platforms
The Day After Tomorrow: 
When Ad Blockers Stop All Analytics PlatformsThe Day After Tomorrow: 
When Ad Blockers Stop All Analytics Platforms
The Day After Tomorrow: 
When Ad Blockers Stop All Analytics Platforms
 
What the Doctor Ordered: Your Yearly Google Algorithm Update Checkup (2016 Ed...
What the Doctor Ordered: Your Yearly Google Algorithm Update Checkup (2016 Ed...What the Doctor Ordered: Your Yearly Google Algorithm Update Checkup (2016 Ed...
What the Doctor Ordered: Your Yearly Google Algorithm Update Checkup (2016 Ed...
 
Estrategias de captación y herramientas esenciales del SEO WorkFlow
Estrategias de captación  y herramientas esenciales del SEO WorkFlowEstrategias de captación  y herramientas esenciales del SEO WorkFlow
Estrategias de captación y herramientas esenciales del SEO WorkFlow
 
Wordcamp 2017-toronto-sam lalonde
Wordcamp 2017-toronto-sam lalondeWordcamp 2017-toronto-sam lalonde
Wordcamp 2017-toronto-sam lalonde
 

Mehr von MnSearch, The Minnesota Search Engine Marketing Association

Mehr von MnSearch, The Minnesota Search Engine Marketing Association (20)

How to Maintain Control of PPC Messaging - Brooke Osmundson | Sept. 2019
How to Maintain Control of PPC Messaging - Brooke Osmundson | Sept. 2019How to Maintain Control of PPC Messaging - Brooke Osmundson | Sept. 2019
How to Maintain Control of PPC Messaging - Brooke Osmundson | Sept. 2019
 
Tidying Up Your Web Content - Alli Berry | July 2019
Tidying Up Your Web Content - Alli Berry | July 2019Tidying Up Your Web Content - Alli Berry | July 2019
Tidying Up Your Web Content - Alli Berry | July 2019
 
The Next Frontier of SEO and Measurement - Jenny Halasz (MnSummit 2019)
The Next Frontier of SEO and Measurement - Jenny Halasz (MnSummit 2019)The Next Frontier of SEO and Measurement - Jenny Halasz (MnSummit 2019)
The Next Frontier of SEO and Measurement - Jenny Halasz (MnSummit 2019)
 
Brands Win Online: PR + Social + Local Search = Boom! - Will Scott (MnSummit ...
Brands Win Online: PR + Social + Local Search = Boom! - Will Scott (MnSummit ...Brands Win Online: PR + Social + Local Search = Boom! - Will Scott (MnSummit ...
Brands Win Online: PR + Social + Local Search = Boom! - Will Scott (MnSummit ...
 
Local SEO: Beyond Google My Business - Dan Leibson (MnSummit 2019)
Local SEO: Beyond Google My Business - Dan Leibson (MnSummit 2019)Local SEO: Beyond Google My Business - Dan Leibson (MnSummit 2019)
Local SEO: Beyond Google My Business - Dan Leibson (MnSummit 2019)
 
Forget About Blogs: Drive Organic Traffic With Microsites - Kevin Indig (MnSu...
Forget About Blogs: Drive Organic Traffic With Microsites - Kevin Indig (MnSu...Forget About Blogs: Drive Organic Traffic With Microsites - Kevin Indig (MnSu...
Forget About Blogs: Drive Organic Traffic With Microsites - Kevin Indig (MnSu...
 
Technical Content Optimization - Mike King (MnSummit 2019)
Technical Content Optimization - Mike King (MnSummit 2019)Technical Content Optimization - Mike King (MnSummit 2019)
Technical Content Optimization - Mike King (MnSummit 2019)
 
Reporting: The Best & Worst Part of Your Job - Dana DiTomaso (MnSummit 2019)
Reporting: The Best & Worst Part of Your Job - Dana DiTomaso (MnSummit 2019)Reporting: The Best & Worst Part of Your Job - Dana DiTomaso (MnSummit 2019)
Reporting: The Best & Worst Part of Your Job - Dana DiTomaso (MnSummit 2019)
 
The Secrets Your Analytics Won’t Tell You About Mobile-First Indexing - Cindy...
The Secrets Your Analytics Won’t Tell You About Mobile-First Indexing - Cindy...The Secrets Your Analytics Won’t Tell You About Mobile-First Indexing - Cindy...
The Secrets Your Analytics Won’t Tell You About Mobile-First Indexing - Cindy...
 
Reaching Qualified Searchers With Google Ads Audience Targeting: A Layered Ap...
Reaching Qualified Searchers With Google Ads Audience Targeting: A Layered Ap...Reaching Qualified Searchers With Google Ads Audience Targeting: A Layered Ap...
Reaching Qualified Searchers With Google Ads Audience Targeting: A Layered Ap...
 
Enter the Remix: Paid Search Edition - Elizabeth Marsten (MnSummit 2019)
Enter the Remix: Paid Search Edition - Elizabeth Marsten (MnSummit 2019)Enter the Remix: Paid Search Edition - Elizabeth Marsten (MnSummit 2019)
Enter the Remix: Paid Search Edition - Elizabeth Marsten (MnSummit 2019)
 
LinkedIn Ads: The Silver Bullet for B2B Lead Gen - AJ Wilcox (MnSummit 2019)
LinkedIn Ads: The Silver Bullet for B2B Lead Gen - AJ Wilcox (MnSummit 2019)LinkedIn Ads: The Silver Bullet for B2B Lead Gen - AJ Wilcox (MnSummit 2019)
LinkedIn Ads: The Silver Bullet for B2B Lead Gen - AJ Wilcox (MnSummit 2019)
 
How to Get Better PPC Results in Less Time With Automation - Frederick Vallae...
How to Get Better PPC Results in Less Time With Automation - Frederick Vallae...How to Get Better PPC Results in Less Time With Automation - Frederick Vallae...
How to Get Better PPC Results in Less Time With Automation - Frederick Vallae...
 
MnSearch Snippets April 2019: Google Data Studio - Steve Slater
MnSearch Snippets April 2019: Google Data Studio - Steve SlaterMnSearch Snippets April 2019: Google Data Studio - Steve Slater
MnSearch Snippets April 2019: Google Data Studio - Steve Slater
 
MnSearch Snippets April 2019: Keyword Research Tools of the Trade - Theresa K...
MnSearch Snippets April 2019: Keyword Research Tools of the Trade - Theresa K...MnSearch Snippets April 2019: Keyword Research Tools of the Trade - Theresa K...
MnSearch Snippets April 2019: Keyword Research Tools of the Trade - Theresa K...
 
MnSearch Snippets April 2019: Screaming Frog Custom Extraction - Griffin Roer
MnSearch Snippets April 2019: Screaming Frog Custom Extraction - Griffin RoerMnSearch Snippets April 2019: Screaming Frog Custom Extraction - Griffin Roer
MnSearch Snippets April 2019: Screaming Frog Custom Extraction - Griffin Roer
 
Influencer Marketing: How to Build an Influencer Network – Michelle Stinson Ross
Influencer Marketing: How to Build an Influencer Network – Michelle Stinson RossInfluencer Marketing: How to Build an Influencer Network – Michelle Stinson Ross
Influencer Marketing: How to Build an Influencer Network – Michelle Stinson Ross
 
How to Find the Story That Sells
How to Find the Story That SellsHow to Find the Story That Sells
How to Find the Story That Sells
 
MnSearch Summit 2018 - Susan Wenogard – Meat and Potatoes to Replace Pies In ...
MnSearch Summit 2018 - Susan Wenogard – Meat and Potatoes to Replace Pies In ...MnSearch Summit 2018 - Susan Wenogard – Meat and Potatoes to Replace Pies In ...
MnSearch Summit 2018 - Susan Wenogard – Meat and Potatoes to Replace Pies In ...
 
MnSearch Summit 2018 - Joy Hawkins and Darren Shaw – Succeeding in Local SEO ...
MnSearch Summit 2018 - Joy Hawkins and Darren Shaw – Succeeding in Local SEO ...MnSearch Summit 2018 - Joy Hawkins and Darren Shaw – Succeeding in Local SEO ...
MnSearch Summit 2018 - Joy Hawkins and Darren Shaw – Succeeding in Local SEO ...
 

Kürzlich hochgeladen

Affiliate Marketing Basic Guide For Beginners _20240521_091615_0000.pdf
Affiliate Marketing Basic Guide For Beginners _20240521_091615_0000.pdfAffiliate Marketing Basic Guide For Beginners _20240521_091615_0000.pdf
Affiliate Marketing Basic Guide For Beginners _20240521_091615_0000.pdf
atinukehassan87
 

Kürzlich hochgeladen (20)

SES London 2009 Beyond Linkbait Greg Jarboe.ppt
SES London 2009 Beyond Linkbait Greg Jarboe.pptSES London 2009 Beyond Linkbait Greg Jarboe.ppt
SES London 2009 Beyond Linkbait Greg Jarboe.ppt
 
ATRIUM GAMING : SLOT GACOR MUDAH MENANG TERBARU
ATRIUM GAMING : SLOT GACOR MUDAH MENANG TERBARUATRIUM GAMING : SLOT GACOR MUDAH MENANG TERBARU
ATRIUM GAMING : SLOT GACOR MUDAH MENANG TERBARU
 
Tea Gobec, Kako pluti po morju tehnoloških sprememb, Innovatif.pdf
Tea Gobec, Kako pluti po morju tehnoloških sprememb, Innovatif.pdfTea Gobec, Kako pluti po morju tehnoloških sprememb, Innovatif.pdf
Tea Gobec, Kako pluti po morju tehnoloških sprememb, Innovatif.pdf
 
How Your Platform Can Achieve a 90% Demo-to-Customer CVR
How Your Platform Can Achieve a 90% Demo-to-Customer CVRHow Your Platform Can Achieve a 90% Demo-to-Customer CVR
How Your Platform Can Achieve a 90% Demo-to-Customer CVR
 
Why Digital Marketing Important for our Business.pdf
Why Digital Marketing Important for our Business.pdfWhy Digital Marketing Important for our Business.pdf
Why Digital Marketing Important for our Business.pdf
 
Link Building in 2024: What Works, What Doesn't, and What's Next
Link Building in 2024: What Works, What Doesn't, and What's NextLink Building in 2024: What Works, What Doesn't, and What's Next
Link Building in 2024: What Works, What Doesn't, and What's Next
 
A chronological journey of jobs and responsibilities.
A chronological journey of jobs and responsibilities.A chronological journey of jobs and responsibilities.
A chronological journey of jobs and responsibilities.
 
Webinar: What the Hell is Legitimate Interest?
Webinar: What the Hell is Legitimate Interest?Webinar: What the Hell is Legitimate Interest?
Webinar: What the Hell is Legitimate Interest?
 
NexGen Alignment: ABM’s Role in Uniting Marketing and Sales
NexGen Alignment: ABM’s Role in Uniting Marketing and SalesNexGen Alignment: ABM’s Role in Uniting Marketing and Sales
NexGen Alignment: ABM’s Role in Uniting Marketing and Sales
 
Fantasy Cricket Apps: A New Viewpoint for Online Cricket Betting Apps
Fantasy Cricket Apps: A New Viewpoint for Online Cricket Betting AppsFantasy Cricket Apps: A New Viewpoint for Online Cricket Betting Apps
Fantasy Cricket Apps: A New Viewpoint for Online Cricket Betting Apps
 
Being a PMM with a multi-product portfolio - Product Marketing Summit
Being a PMM with a multi-product portfolio - Product Marketing SummitBeing a PMM with a multi-product portfolio - Product Marketing Summit
Being a PMM with a multi-product portfolio - Product Marketing Summit
 
The Wealth of a Homeonwers association is analogous to the wealth of a Nation
The Wealth of a Homeonwers association is analogous to the wealth of a NationThe Wealth of a Homeonwers association is analogous to the wealth of a Nation
The Wealth of a Homeonwers association is analogous to the wealth of a Nation
 
DM digital marketing service: grow your business & revenue
DM digital marketing service: grow your business & revenueDM digital marketing service: grow your business & revenue
DM digital marketing service: grow your business & revenue
 
SocialMedia Marketing Plan for TheSparksFoundation
SocialMedia Marketing Plan for TheSparksFoundationSocialMedia Marketing Plan for TheSparksFoundation
SocialMedia Marketing Plan for TheSparksFoundation
 
How to Track, Measure & Communicate SEO Results
How to Track, Measure & Communicate SEO ResultsHow to Track, Measure & Communicate SEO Results
How to Track, Measure & Communicate SEO Results
 
TikTok: The Cultural Revolution in 10 minutes!
TikTok: The Cultural Revolution in 10 minutes! TikTok: The Cultural Revolution in 10 minutes!
TikTok: The Cultural Revolution in 10 minutes!
 
BrightonSEO - Search Engine Omnipresence_ Why SEOs need to look beyond Google
BrightonSEO - Search Engine Omnipresence_ Why SEOs need to look beyond GoogleBrightonSEO - Search Engine Omnipresence_ Why SEOs need to look beyond Google
BrightonSEO - Search Engine Omnipresence_ Why SEOs need to look beyond Google
 
Affiliate Marketing Basic Guide For Beginners _20240521_091615_0000.pdf
Affiliate Marketing Basic Guide For Beginners _20240521_091615_0000.pdfAffiliate Marketing Basic Guide For Beginners _20240521_091615_0000.pdf
Affiliate Marketing Basic Guide For Beginners _20240521_091615_0000.pdf
 
Snapshot of Consumer Behaviors of April 2024-EOLiSurvey (EN).pdf
Snapshot of Consumer Behaviors of April 2024-EOLiSurvey (EN).pdfSnapshot of Consumer Behaviors of April 2024-EOLiSurvey (EN).pdf
Snapshot of Consumer Behaviors of April 2024-EOLiSurvey (EN).pdf
 
Japanese Sauna Hat Trends - Totonoete Inc.
Japanese Sauna Hat Trends - Totonoete Inc.Japanese Sauna Hat Trends - Totonoete Inc.
Japanese Sauna Hat Trends - Totonoete Inc.
 

Google Tag Manager: Ultimate Crash Course - 2017 MnSearch Summit

  • 1. GOOGLE TAG MANAGER ULTIMATE CRASH COURSE #MnSummit @mike_arnesen | upbuild.io
  • 2. #MnSummit @mike_arnesen | upbuild.io WHO AM I?
  • 3. #MnSummit @mike_arnesen | upbuild.io — @MIKE_ARNESEN "I’M THAT GUY YOU KNOW FROM THE INTERNET!"
  • 4. #MnSummit @mike_arnesen | upbuild.io at UpBuild FOUNDER/CEO
  • 5. #MnSummit @mike_arnesen | upbuild.io at UpBuild FOUNDER/CEO
  • 6. #MnSummit @mike_arnesen | upbuild.io in the REAL WORLD MASSIVE GEEK
  • 7. #MnSummit @mike_arnesen | upbuild.io GET THIS DECK BIT.LY/GTM-CRASH-COURSE
  • 8. CRASH COURSE! THIS WILL BE A #MnSummit @mike_arnesen | upbuild.io
  • 9. #MnSummit @mike_arnesen | upbuild.io THIS IS A CRASH COURSE IF YOU WANT A BETTER UNDERSTANDING OF THE FUNDAMENTALS, YOU'RE IN THE RIGHT PLACE.
  • 10. #MnSummit @mike_arnesen | upbuild.io THIS IS A CRASH COURSE IF YOU ALREADY KNOW GTM AND WANT TO LEARN ADVANCED TACTICS, YOU'RE ALSO IN THE RIGHT PLACE.
  • 11. #MnSummit @mike_arnesen | upbuild.io THIS IS A CRASH COURSE IF YOU'RE HOPING TO LEARN HOW TO DO THINGS YOU DIDN'T EVEN KNOW YOU COULD DO, YOU'RE IN THE RIGHT PLACE!
  • 12. #MnSummit @mike_arnesen | upbuild.io I WANT YOU TO GET TAKEAWAYS
  • 13. #MnSummit @mike_arnesen | upbuild.io TAG MANAGEMENT? WHAT IS TAG MANAGEMENT?
  • 14. #MnSummit @mike_arnesen | upbuild.io TAG MANAGER: A SOLUTION FOR MANAGING WEBSITE TAGS THROUGH A CENTRAL INTERFACE DECOUPLED FROM THE SOURCE CODE OF THE WEBSITE.   * TECHNICAL DEFINITION
  • 15. #MnSummit @mike_arnesen | upbuild.io TAG MANAGER: A WAY TO ADD CODE TO YOUR THING WITHOUT CHANGING YOUR THING. * SIMPLIFIED DEFINITION
  • 16. YOUR PORTAL INTO THE SOURCE CODE! #MnSummit @mike_arnesen | upbuild.io
  • 17. #MnSummit @mike_arnesen | upbuild.io A WARP ZONE TO SKIP THE HARD PARTS!
  • 18. THE ULTIMATE HACK TO OVERRIDE THE SYSTEM! #MnSummit @mike_arnesen | upbuild.io
  • 19.
  • 20. #MnSummit @mike_arnesen | upbuild.io BY THE POWER 
 OF GTM ADD, CHANGE, OR REMOVE TAGS What
  • 21. #MnSummit @mike_arnesen | upbuild.io tagmanager.google.com BY THE POWER 
 OF GTM IN A WEB INTERFACE Where
  • 22. #MnSummit @mike_arnesen | upbuild.io BY THE POWER 
 OF GTM USING A SMALL SNIPPET OF JAVASCRIPT CODE How
  • 23. #MnSummit @mike_arnesen | upbuild.io BY THE POWER 
 OF GTM BECAUSE IT SOLVES ALL OUR PROBLEMS! Why?
  • 24. #MnSummit @mike_arnesen | upbuild.io PROBLEMS? WHAT PROBLEMS?
  • 25. #MnSummit @mike_arnesen | upbuild.io – Marketing Manager “We love that idea, 
 but realistically it's not going to happen until next quarter. 
 We've run out of development budget."
  • 26. #MnSummit @mike_arnesen | upbuild.io – Business Owner “I know you checked last week, 
 but our outsourced dev thinks the semantic markup implementation 
 is right this time. Can you check?"
  • 27. #MnSummit @mike_arnesen | upbuild.io –Director of Marketing “Our new homepage went live 
 this morning and we noticed that analytics stopped working. 
 How hard is that to fix?"
  • 28. #MnSummit @mike_arnesen | upbuild.io – Marketing Strategist “We need to have this new pop-up asking for donations on our site by the end of the week. 
 I don't think it's going to happen, but do you have any ideas?"
  • 29. #MnSummit @mike_arnesen | upbuild.io – Marketers “Why is everything on fire?"
  • 30. #MnSummit @mike_arnesen | upbuild.io – Marketers “Why is everything on fire?"
  • 31. #MnSummit @mike_arnesen | upbuild.io THE DECK CAN SEEM LIKE IT’S STACKED AGAINST US
  • 32. #MnSummit @mike_arnesen | upbuild.io THE DECK CAN SEEM LIKE IT’S STACKED AGAINST US WHY MUST LIFE BE SO HARD?!
  • 33. #MnSummit @mike_arnesen | upbuild.io THE DECK CAN SEEM LIKE IT’S STACKED AGAINST US WHY MUST I FAIL AT EVERY ATTEMPT AT MARKETING?!
  • 34. #MnSummit @mike_arnesen | upbuild.io GOOGLE TAG MANAGER SOLVES ALL OUR PROBLEMS!*
  • 35. #MnSummit @mike_arnesen | upbuild.io GOOGLE TAG MANAGER SOLVES ALL OUR PROBLEMS!* * Well, a lot of things
  • 36. #MnSummit @mike_arnesen | upbuild.io GOOGLE TAG MANAGER SOLVES ALL OUR PROBLEMS!* * Well, a lot of things ** Your mileage may vary
  • 37. #MnSummit @mike_arnesen | upbuild.io — All of us, I hope "But how?!"
  • 38. BASIC COMPONENTS OF GTM #MnSummit @mike_arnesen | upbuild.io Tags Triggers Variables
  • 39. #MnSummit @mike_arnesen | upbuild.io TAGS THE WORKERS, THE MOVERS & SHAKERS, THE STARS OF THE SHOW
  • 40. #MnSummit @mike_arnesen | upbuild.io TAGS Common Tags • UA Page View — Page View • UA Event Tracking — Events • AdWords — Conversion Tracking • Facebook Pixel — Custom HTML • LinkedIn — Insights • DoubleClick — Floodlight Counter
  • 41. #MnSummit @mike_arnesen | upbuild.io TRIGGERS EVERY TAG NEEDS A TRIGGER
  • 42. #MnSummit @mike_arnesen | upbuild.io TRIGGERS Common Triggers • All Pages — on Page View • All Pages — on Window Loaded • Some Pages — Matching Certain Paths • Link Clicks — Matching Certain Attributes • Form Submission — Matching Certain Forms • Custom Event — DataLayer Events
  • 43. #MnSummit @mike_arnesen | upbuild.io VARIABLES ANY DATA SUBJECT TO CHANGE. MOST TRIGGERS LEVERAGE SOME TYPE OF VARIABLE.
  • 44. #MnSummit @mike_arnesen | upbuild.io VARIABLES Common Variables • Page Path, URL , & Hostname — Built-Ins • Google Analytics Tracking ID — Constant • Click Classes & Click IDs — Built-In • Click Element — For CSS Selection • Form ID — Built-In • GA Settings — Settings Configuration
  • 45. BY THE POWER OF JAVASCRIPT #MnSummit @mike_arnesen | upbuild.io
  • 46. GOOGLE TAG MANAGER IS AN ABSTRACTION OF JAVASCRIPT #MnSummit @mike_arnesen | upbuild.io
  • 47. #MnSummit @mike_arnesen | upbuild.io FROM GTM INTERFACE Tag Trigger Variable
  • 48. #MnSummit @mike_arnesen | upbuild.io TO JAVASCRIPT CODE $(document).ready( function() { ga('create', 'UA-XXXXX-Y', 'auto'); ga('send','pageview',
 location.pathname); } ) Tag Trigger Variable Variable
  • 49. #MnSummit @mike_arnesen | upbuild.io TO JAVASCRIPT CODE $(document).ready( function() { ga('create', 'UA-XXXXX-Y', 'auto'); ga('send','pageview',
 location.pathname); } ) Tag Trigger Variable Variable Sorry, purists. jQuery is way easier to look at.
  • 50. #MnSummit @mike_arnesen | upbuild.io TO JAVASCRIPT THE CAUSE OF, AND SOLUTION TO, ALL OF LIFE’S PROBLEMS
  • 51. #MnSummit @mike_arnesen | upbuild.io LIMITATIONS OF GTM IT’S A CLIENT-SIDE APPLICATION
  • 52. #MnSummit @mike_arnesen | upbuild.io SERVER-SIDE RUNS ON A SERVER BEFORE IT GETS TO THE BROWSER
  • 53. #MnSummit @mike_arnesen | upbuild.io CLIENT-SIDE RUNS IN A USER’S BROWSER AFTER INITIAL DELIVERY
  • 54. #MnSummit @mike_arnesen | upbuild.io AJAX Asynchronous JavaScript and XML
  • 55. #MnSummit @mike_arnesen | upbuild.io AJAX Asynchronous JavaScript and XML JSON!
  • 56. ENTER, 
 THE DATALAYER #MnSummit @mike_arnesen | upbuild.io
  • 57. #MnSummit @mike_arnesen | upbuild.io DATALAYER MAKE IMPORTANT DATA AVAILABLE TO YOUR CLIENT-SIDE APPLICATION Server Client DataLayer
  • 58. #MnSummit @mike_arnesen | upbuild.io DATALAYER SLIDE THINGS THROUGH TO THE OTHER SIDE OF THE BULLETPROOF GLASS Server Client DataLayer
  • 59. #MnSummit @mike_arnesen | upbuild.io GET THE DATA OUT OF THERE! BECAUSE BEING TRAPPED ON THE WRONG SIDE OF THE GLASS SUCKS
  • 60. #MnSummit @mike_arnesen | upbuild.io Client THE DATALAYER IS VERSATILE IT CAN BE USED TO PASS DATA FROM THE SERVER THROUGH TO THE CLIENT ServerDataLayer
  • 61. #MnSummit @mike_arnesen | upbuild.io Client THE DATALAYER IS VERSATILE OR PUSH CLIENT-SIDE DATA INTO AN EASY- TO-ACCESS POCKET ServerDataLayer
  • 62. #MnSummit @mike_arnesen | upbuild.io DATALAYER BASICS <script>   dataLayer = []; </script> Goes ABOVE your GTM snippet!
  • 63. #MnSummit @mike_arnesen | upbuild.io DATALAYER BASICS <script>   dataLayer = [{     'userType': 'registered',     'lifetimeValue': 108.00,   }]; </script> Pass through data from your server
  • 64. #MnSummit @mike_arnesen | upbuild.io DATALAYER BASICS <script>   dataLayer = [{     'userType': 'registered',     'lifetimeValue': 108.00,   }]; </script>
  • 65. #MnSummit @mike_arnesen | upbuild.io DATALAYER BASICS <script>   dataLayer = [{     'userType': 'registered',     'lifetimeValue': 108.00,   }]; </script>
  • 66. #MnSummit @mike_arnesen | upbuild.io ADVANCED DATALAYER <script>   dataLayer.push({   'event': 'KPI Event',   'eventCategory': 'nav click',   'eventAction': 'about us' });   </script> Pass in your own data
  • 67. #MnSummit @mike_arnesen | upbuild.io HOW TO USE GTM LIKE A PRO IMPRESS YOUR COWORKERS
  • 68. #MnSummit @mike_arnesen | upbuild.io HOW TO USE GTM LIKE A PRO IMPRESS YOUR COWORKERS IMPRESS YOUR FRIENDS
  • 69. #MnSummit @mike_arnesen | upbuild.io HOW TO USE GTM LIKE A PRO IMPRESS YOUR COWORKERS IMPRESS YOUR FRIENDS IMPRESS YOUR SIGNIFICANT OTHER
  • 70. #MnSummit @mike_arnesen | upbuild.io MY BEST 
 GTM PRO TIPS
  • 71. #MnSummit @mike_arnesen | upbuild.io MY BEST GTM PRO TIPS 1. Track Clicks, the basic way 2. Track Clicks, the UpBuild way 3. Page-Level Custom Dimensions 4. Implement JSON-LD, at scale 5. Analyze Form Abandonment 6. VPVs for Single-Page Experiences 7. Make Website Changes, without developers 8. Recruiting Technical Talent, bonus!
  • 72. #MnSummit @mike_arnesen | upbuild.io MY BEST GTM PRO TIPS 1. Track Clicks, the basic way 2. Track Clicks, the UpBuild way 3. Page-Level Custom Dimensions 4. Implement JSON-LD, at scale 5. Analyze Form Abandonment 6. VPVs for Single-Page Experiences 7. Make Website Changes, without developers 8. Recruiting Technical Talent, bonus!
  • 73. #MnSummit @mike_arnesen | upbuild.io MY BEST GTM PRO TIPS 1. Track Clicks, the basic way 2. Track Clicks, the UpBuild way 3. Page-Level Custom Dimensions 4. Implement JSON-LD, at scale 5. Analyze Form Abandonment 6. VPVs for Single-Page Experiences 7. Make Website Changes, without developers 8. Recruiting Technical Talent, bonus!
  • 74. #MnSummit @mike_arnesen | upbuild.io MY BEST GTM PRO TIPS 1. Track Clicks, the basic way 2. Track Clicks, the UpBuild way 3. Page-Level Custom Dimensions 4. Implement JSON-LD, at scale 5. Analyze Form Abandonment 6. VPVs for Single-Page Experiences 7. Make Website Changes, without developers 8. Recruiting Technical Talent, bonus!
  • 75. #MnSummit @mike_arnesen | upbuild.io MY BEST GTM PRO TIPS 1. Track Clicks, the basic way 2. Track Clicks, the UpBuild way 3. Page-Level Custom Dimensions 4. Implement JSON-LD, at scale 5. Analyze Form Abandonment 6. VPVs for Single-Page Experiences 7. Make Website Changes, without developers 8. Recruiting Technical Talent, bonus!
  • 76. #MnSummit @mike_arnesen | upbuild.io MY BEST GTM PRO TIPS 1. Track Clicks, the basic way 2. Track Clicks, the UpBuild way 3. Page-Level Custom Dimensions 4. Implement JSON-LD, at scale 5. Analyze Form Abandonment 6. VPVs for Single-Page Experiences 7. Make Website Changes, without developers 8. Recruiting Technical Talent, bonus!
  • 77. #MnSummit @mike_arnesen | upbuild.io MY BEST GTM PRO TIPS 1. Track Clicks, the basic way 2. Track Clicks, the UpBuild way 3. Page-Level Custom Dimensions 4. Implement JSON-LD, at scale 5. Analyze Form Abandonment 6. VPVs for Single-Page Experiences 7. Make Website Changes, without developers 8. Recruiting Technical Talent, bonus!
  • 78. #MnSummit @mike_arnesen | upbuild.io MY BEST GTM PRO TIPS 1. Track Clicks, the basic way 2. Track Clicks, the UpBuild way 3. Page-Level Custom Dimensions 4. Implement JSON-LD, at scale 5. Analyze Form Abandonment 6. VPVs for Single-Page Experiences 7. Make Website Changes, without developers 8. Recruiting Technical Talent, bonus!
  • 79. #MnSummit @mike_arnesen | upbuild.io Goal: Understand which clickable elements get the most (or least) use. Optimize accordingly. TRACK CLICKS
  • 80. #MnSummit @mike_arnesen | upbuild.io Goal: Understand which clickable elements get the most (or least) use. Optimize accordingly. Approach: Tell GTM to listen for clicks on the elements we care about and then send readable data to Google Analytics. TRACK CLICKS
  • 81. #MnSummit @mike_arnesen | upbuild.io TRACK CLICKS 1. Enable built-In Variables 2. Create new GA (Universal) Tag 3. Create new Trigger 4. Preview (Test), Submit, & Publish
  • 82. #MnSummit @mike_arnesen | upbuild.io TRACK CLICKS 1. Enable built-In Variables 2. Create new GA (Universal) Tag 3. Create new Trigger 4. Preview (Test), Submit, & Publish
  • 83. #MnSummit @mike_arnesen | upbuild.io TRACK CLICKS 1. Enable built-In Variables 2. Create new GA (Universal) Tag 3. Create new Trigger 4. Preview (Test), Submit, & Publish
  • 84. #MnSummit @mike_arnesen | upbuild.io TRACK CLICKS 1. Enable built-In Variables 2. Create new GA (Universal) Tag 3. Create new Trigger 4. Preview (Test), Submit, & Publish nav > ul > li > a
  • 85. #MnSummit @mike_arnesen | upbuild.io 1. Enable built-In Variables 2. Create new GA (Universal) Tag 3. Create new Trigger 4. Preview (Test), Submit, & Publish TRACK CLICKS
  • 86. #MnSummit @mike_arnesen | upbuild.io QUICK TESTING FOR SELECTORS function testSelector (s){ var te = document.querySelectorAll(s), prettyData = "Includes: "; for (var i = 0; i < te.length; i++) { prettyData += te[i].innerHTML + " (Link " + (i+1) + ")"; if (i < te.length-1) { prettyData += ", " } } return prettyData; } 1. Ctrl + Shift + J / Cmd + Option + J in Chrome 2. Copy + Paste 3. type: testSelector('your css'); codepen.io/mike_arnesen/pen/mwMqee/
  • 87. #MnSummit @mike_arnesen | upbuild.io QUICK TESTING FOR SELECTORS
  • 88. #MnSummit @mike_arnesen | upbuild.io Goal: Understand which clickable elements get the most (or least) use. Optimize accordingly. TRACK CLICKS The UpBuild Way!
  • 89. #MnSummit @mike_arnesen | upbuild.io Goal: Understand which clickable elements get the most (or least) use. Optimize accordingly. Approach: Collect the same data, but… TRACK CLICKS The UpBuild Way!
  • 90. #MnSummit @mike_arnesen | upbuild.io Goal: Understand which clickable elements get the most (or least) use. Optimize accordingly. Approach: Collect the same data, but… A. in the most efficient way possible B. with the fewest GTM tags C. in a way that scales TRACK CLICKS The UpBuild Way!
  • 91. #MnSummit @mike_arnesen | upbuild.io 1. Create 3 New DataLayer Variables 2. Create a Tag to Send All Event Data 3. Create a Trigger for "KPI Event" 4. Establish an HTML Tag to Manage Click Tracking TRACK CLICKS The UpBuild Way!
  • 92. #MnSummit @mike_arnesen | upbuild.io 1. Create 3 New DataLayer Variables 2. Create a Tag to Send All Event Data • use {{dataLayer variables}} 3. Create a Trigger for "KPI Event" 4. Establish an HTML Tag to Manage Click Tracking TRACK CLICKS The UpBuild Way!
  • 93. #MnSummit @mike_arnesen | upbuild.io 1. Create 3 New DataLayer Variables 2. Create a Tag to Send All Event Data 3. Create a Trigger for "KPI Event" 4. Establish an HTML Tag to Manage Click Tracking TRACK CLICKS The UpBuild Way!
  • 94. #MnSummit @mike_arnesen | upbuild.io 1. Create 3 New DataLayer Variables 2. Create a Tag to Send All Event Data 3. Create a Trigger for "KPI Event" 4. Establish an HTML Tag to Manage Click Tracking TRACK CLICKS The UpBuild Way!
  • 95. #MnSummit @mike_arnesen | upbuild.io ADVANCED CLICK TRACKING <script> // Primary navigation jQuery("nav > ul > li > a").each(function(index) { jQuery(this).click(function() { dataLayer.push({ 'event': 'KPI Event', 'eventCategory': 'Navigation', 'eventAction': 'Primary Nav Click', 'eventLabel': jQuery("nav > ul > li > a")[index].text.toLowerCase() }); }); }); </script> 1. Find a selector for the tracked element 2. Define your data labeling 3. Use jQuery to build dynamic event values codepen.io/mike_arnesen/pen/OgjOXb
  • 96. #MnSummit @mike_arnesen | upbuild.io ADVANCED CLICK TRACKING <script> // Dropdown nav items jQuery(".sub-menu > li > a").each(function(index) { jQuery(this).click(function() { dataLayer.push({ 'event': 'KPI Event', 'eventCategory': 'Navigation', 'eventAction': 'Dropdown Nav Click', 'eventLabel': jQuery(".sub-menu > li > a")[index].text.toLowerCase() }); }); }); </script> 4. Add a new block for each KPI group 5. Put everything within one <script> tag. codepen.io/mike_arnesen/pen/OgjOXb
  • 97. #MnSummit @mike_arnesen | upbuild.io Goal: Enable GA segmentation by page attributes like author, publication month, word count, etc. PAGE-LEVEL CUSTOM DIMENSIONS
  • 98. #MnSummit @mike_arnesen | upbuild.io Goal: Enable GA segmentation by page attributes like author, publication month, word count, etc. Approach: Use GTM variables to harvest on-page information and pass in back with our analytics page view tag. PAGE-LEVEL CUSTOM DIMENSIONS
  • 99. #MnSummit @mike_arnesen | upbuild.io 1. Create a New Custom Dimension in GA 2. Create a New "DOM Element" Variable, based on the CSS selector of attribute 3. Update your GA Settings variable to set the Custom Dimension based on the Variable from Step 2 PAGE-LEVEL CUSTOM DIMENSIONS upbuild.io/blog/track-post-publish-date-custom-dimension-google-analytics/
  • 100. #MnSummit @mike_arnesen | upbuild.io 1. Create a New Custom Dimension in GA 2. Create a New "DOM Element" Variable, based on the CSS selector of attribute 3. Update your GA Settings variable to set the Custom Dimension based on the Variable from Step 2 PAGE-LEVEL CUSTOM DIMENSIONS upbuild.io/blog/track-post-publish-date-custom-dimension-google-analytics/
  • 101. #MnSummit @mike_arnesen | upbuild.io 1. Create a New Custom Dimension in GA 2. Create a New "DOM Element" Variable, based on the CSS selector of attribute 3. Update your GA Settings variable to set the Custom Dimension based on the Variable from Step 2 PAGE-LEVEL CUSTOM DIMENSIONS upbuild.io/blog/track-post-publish-date-custom-dimension-google-analytics/
  • 102. #MnSummit @mike_arnesen | upbuild.io Goal: Improve SEO by delivering structured data to Googlebot in JSON-LD format IMPLEMENT JSON-LD
  • 103. #MnSummit @mike_arnesen | upbuild.io Goal: Improve SEO by delivering structured data to Googlebot in JSON-LD format Approach: Use GTM variables to harvest on-page information (a lot of it), assemble everything in a JSON- LD template, and make available to Google. IMPLEMENT JSON-LD
  • 104. #MnSummit @mike_arnesen | upbuild.io 1. Map out all the data points you need 2. Create a new "DOM Element" (or "Custom JavaScript") variable for each 3. Get a JSON-LD template from schema.org 4. Replace placeholder values with {{variables}} 5. Place within a <script> that outputs indexable JSON-LD IMPLEMENT JSON-LD moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
  • 105. #MnSummit @mike_arnesen | upbuild.io 1. Map out all the data points you need 2. Create a new "DOM Element" (or "Custom JavaScript") variable for each 3. Get a JSON-LD template from schema.org 4. Replace placeholder values with {{variables}} 5. Place within a <script> that outputs indexable JSON-LD IMPLEMENT JSON-LD moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
  • 106. #MnSummit @mike_arnesen | upbuild.io 1. Map out all the data points you need 2. Create a new "DOM Element" (or "Custom JavaScript") variable for each 3. Get a JSON-LD template from schema.org 4. Replace placeholder values with {{variables}} 5. Place within a <script> that outputs indexable JSON-LD IMPLEMENT JSON-LD moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
  • 107. #MnSummit @mike_arnesen | upbuild.io 1. Map out all the data points you need 2. Create a new "DOM Element" (or "Custom JavaScript") variable for each 3. Get a JSON-LD template from schema.org 4. Replace placeholder values with {{variables}} 5. Place within a <script> that outputs indexable JSON-LD IMPLEMENT JSON-LD moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
  • 108. #MnSummit @mike_arnesen | upbuild.io 1. Map out all the data points you need 2. Create a new "DOM Element" (or "Custom JavaScript") variable for each 3. Get a JSON-LD template from schema.org 4. Replace placeholder values with {{variables}} 5. Place within a <script> that outputs indexable JSON-LD IMPLEMENT JSON-LD moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
  • 109. #MnSummit @mike_arnesen | upbuild.io 1. Map out all the data points you need 2. Create a new "DOM Element" (or "Custom JavaScript") variable for each 3. Get a JSON-LD template from schema.org 4. Replace placeholder values with {{variables}} 5. Place within a <script> that outputs indexable JSON-LD IMPLEMENT JSON-LD moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
  • 110. #MnSummit @mike_arnesen | upbuild.io 6. Get rich snippets! • Take over world. IMPLEMENT JSON-LD moz.com/blog/using-google-tag-manager-to-dynamically-generate-schema-org-json-ld-tags
  • 111. #MnSummit @mike_arnesen | upbuild.io Goal: Understand when users stop filling out forms to improve form fill conversion rate. FORM ABANDONMENT
  • 112. #MnSummit @mike_arnesen | upbuild.io Goal: Understand when users stop filling out forms to improve form fill conversion rate. Approach: Use GTM to deliver JavaScript that will progressively log interactions and, upon abandonment, send a record to GA. FORM ABANDONMENT
  • 113. #MnSummit @mike_arnesen | upbuild.io 1. Modify the sample script 2. Create a new analytics tag in GTM 3. Create three new DataLayer variables FORM ABANDONMENT
  • 114. #MnSummit @mike_arnesen | upbuild.io 1. Modify the sample script 2. Create a new analytics tag in GTM 3. Create three new DataLayer variables FORM ABANDONMENT
  • 115. #MnSummit @mike_arnesen | upbuild.io 1. Modify the sample script 2. Create a new analytics tag in GTM 3. Create three new DataLayer variables FORM ABANDONMENT
  • 116. #MnSummit @mike_arnesen | upbuild.io 1. Modify the sample script 2. Create a new analytics tag in GTM 3. Create three new DataLayer variables 4. Use your existing Click Tracking tag & DataLayer variables FORM ABANDONMENT
  • 117. #MnSummit @mike_arnesen | upbuild.io 1. Modify the sample script 2. Create a new analytics tag in GTM 3. Create three new DataLayer variables 4. Use your existing Click Tracking tag & DataLayer variables FORM ABANDONMENT Learn more JavaScript!
  • 118. #MnSummit @mike_arnesen | upbuild.io FORM ABANDONMENT <script> var formSelector = "#wpcf7-f511-p15-o1 > form"; var submitSelector = ".wpcf7-submit"; var formInteractions = []; var attribute = "name"; var pagePath = window.location.pathname; ... 1. Specify your form selector 2. Specify a submit selector 3. Specify the attr you want as a label codepen.io/mike_arnesen/pen/gRxorv
  • 119. #MnSummit @mike_arnesen | upbuild.io FORM ABANDONMENT ... document.querySelector(formSelector).addEv entListener("change", function(e) { var input = e["target"].getAttribute(attribute); if (formInteractions[i] !== input) { formInteractions.push(input); } }); ... 4. This listens for changes to the form 5. Each change is stored in "formInteractions" codepen.io/mike_arnesen/pen/gRxorv
  • 120. #MnSummit @mike_arnesen | upbuild.io FORM ABANDONMENT ... function pushToDataLayer(cause, formInteractions) { var prettyPath; if (formInteractions == "") { prettyPath = "Nothing set"; } else { prettyPath = formInteractions.join(" > "); }; dataLayer.push({ event: "KPI Event", eventCategory: "Form Abandon Contact Us", eventAction: prettyPath, eventLabel: "form abandoned on " + pagePath + " triggered by " + cause }); } ... 6. This lets you push all interactions to the dataLayer 7. Change "eventCategory" to suit your needs codepen.io/mike_arnesen/pen/gRxorv
  • 121. #MnSummit @mike_arnesen | upbuild.io FORM ABANDONMENT ... jQuery(window).on('beforeunload', function(){ pushToDataLayer("page bounce", formInteractions); }); ... 8. Before anyone leaves, call pushToDataLayer function (previous slide) 9. You can provide a custom "cause" codepen.io/mike_arnesen/pen/gRxorv
  • 122. #MnSummit @mike_arnesen | upbuild.io FORM ABANDONMENT ... jQuery("submitSelector").on("click", function(){ jQuery(window).off('beforeunload'); }); </script> 10. On submission, remove abandonment monitoring codepen.io/mike_arnesen/pen/gRxorv
  • 123. #MnSummit @mike_arnesen | upbuild.io Goal: Define checkpoints in single-page experiences (e.g., one-page checkout, configurators, wizards, long forms) to understand how they perform. VIRTUAL PAGE VIEWS
  • 124. #MnSummit @mike_arnesen | upbuild.io Goal: Define checkpoints in single-page experiences (e.g., one-page checkout, configurators, wizards, long forms) to understand how they perform. Approach: Use GTM to sent page view info to the dataLayer, fire a dedicated VPV tag to send info to GA as pageviews, and set up a traditional GA goal funnel for analysis. VIRTUAL PAGE VIEWS
  • 125. #MnSummit @mike_arnesen | upbuild.io VIRTUAL PAGE VIEWS 1. Break the process into defined steps. Decide on virtual titles & URLs 2. Set up the goal in GA 3. Create 2 new "DataLayer" variables (pagePath & pageTitle) 4. Build new Config variable for VPVs 5. Set up a VPV Analytics Tag 6. Deploy JS that attaches handlers to the breakpoints and pushes to the dataLayer.
  • 126. #MnSummit @mike_arnesen | upbuild.io VIRTUAL PAGE VIEWS 1. Break the process into defined steps. Decide on virtual titles & URLs 2. Set up the goal in GA 3. Create 2 new "DataLayer" variables (pagePath & pageTitle) 4. Build new Config variable for VPVs 5. Set up a VPV Analytics Tag 6. Deploy JS that attaches handlers to the breakpoints and pushes to the dataLayer.
  • 127. #MnSummit @mike_arnesen | upbuild.io 1. Break the process into defined steps. Decide on virtual titles & URLs 2. Set up the goal in GA 3. Create 2 new "DataLayer" variables (pagePath & pageTitle) 4. Build new Config variable for VPVs 5. Set up a VPV Analytics Tag 6. Deploy JS that attaches handlers to the breakpoints and pushes to the dataLayer. VIRTUAL PAGE VIEWS
  • 128. #MnSummit @mike_arnesen | upbuild.io 1. Break the process into defined steps. Decide on virtual titles & URLs 2. Set up the goal in GA 3. Create 2 new "DataLayer" variables (pagePath & pageTitle) 4. Build new Config variable for VPVs 5. Set up a VPV Analytics Tag 6. Deploy JS that attaches handlers to the breakpoints and pushes to the dataLayer. VIRTUAL PAGE VIEWS
  • 129. #MnSummit @mike_arnesen | upbuild.io 1. Break the process into defined steps. Decide on virtual titles & URLs 2. Set up the goal in GA 3. Create 2 new "DataLayer" variables (pagePath & pageTitle) 4. Build new Config variable for VPVs 5. Set up a VPV Analytics Tag 6. Deploy JS that attaches handlers to the breakpoints and pushes to the dataLayer. VIRTUAL PAGE VIEWS
  • 130. #MnSummit @mike_arnesen | upbuild.io 1. Break the process into defined steps. Decide on virtual titles & URLs 2. Set up the goal in GA 3. Create 2 new "DataLayer" variables (pagePath & pageTitle) 4. Build new Config variable for VPVs 5. Set up a VPV Analytics Tag 6. Deploy JS that attaches handlers to the breakpoints and pushes to the dataLayer VIRTUAL PAGE VIEWS
  • 131. #MnSummit @mike_arnesen | upbuild.io VPV TRACKING <script> var vpvData = [ {selector: "#serviceneed > input[type='submit']", title: "Create a Project Form - Step 1", path: "/vpv/create-project/step-01/"}, {selector: "#gform_next_button_1_27", title: "Create a Project Form - Step 2", path: "/vpv/create-project/step-02/"}, {selector: "#gform_next_button_1_28", title: "Create a Project Form - Step 3", path: "/vpv/create-project/step-03/"} ]; ... 1. Define three things for each virtual step • Selector for click activation, Virtual title, Virtual page path codepen.io/mike_arnesen/pen/GEvgww
  • 132. #MnSummit @mike_arnesen | upbuild.io VPV TRACKING ... function pushToDataLayer(i) { dataLayer.push({ event: "vpv", pageTitle: vpvData[i].title, pagePath: vpvData[i].path }); }
 ... 2. Write another pushToDataLayer function codepen.io/mike_arnesen/pen/GEvgww
  • 133. #MnSummit @mike_arnesen | upbuild.io VPV TRACKING ... jQuery(vpvData[0].selector).click(function (){ pushToDataLayer(0); }); jQuery(vpvData[1].selector).click(function (){ pushToDataLayer(1); }); jQuery(vpvData[2].selector).click(function (){ pushToDataLayer(2); })
 ... 3. Do this for as many steps as you have, starting at zero. codepen.io/mike_arnesen/pen/GEvgww
  • 134. #MnSummit @mike_arnesen | upbuild.io Goal: Make updates to the website without having to wait for developers or use budget prematurely. UPDATE YOUR WEBSITE
  • 135. #MnSummit @mike_arnesen | upbuild.io Goal: Make updates to the website without having to wait for developers or use budget prematurely. Approach: Use GTM to deliver a custom HTML tag containing site- modifying JavaScript to update the site as the page loads. UPDATE YOUR WEBSITE
  • 136. #MnSummit @mike_arnesen | upbuild.io Goal: Make updates to the website without having to wait for developers or use budget prematurely. Approach: Use GTM to deliver a custom HTML tag containing site- modifying JavaScript to update the site as the page loads. UPDATE YOUR WEBSITE These changes are indexable!*
  • 137. #MnSummit @mike_arnesen | upbuild.io Goal: Make updates to the website without having to wait for developers or use budget prematurely. Approach: Use GTM to deliver a custom HTML tag containing site- modifying JavaScript to update the site as the page loads. UPDATE YOUR WEBSITE These changes are indexable!* * usually
  • 138. #MnSummit @mike_arnesen | upbuild.io Goal: Make updates to the website without having to wait for developers or use budget prematurely. Approach: Use GTM to deliver a custom HTML tag containing site- modifying JavaScript to update the site as the page loads. UPDATE YOUR WEBSITE These changes are indexable!* * usually ** your mileage may vary
  • 139. #MnSummit @mike_arnesen | upbuild.io Goal: Make updates to the website without having to wait for developers or use budget prematurely. Approach: Use GTM to deliver a custom HTML tag containing site- modifying JavaScript to update the site as the page loads. UPDATE YOUR WEBSITE These changes are indexable!* * usually ** your mileage may vary *** a lot.
  • 140. #MnSummit @mike_arnesen | upbuild.io 1. Write your HTML and CSS 2. Determine where you want it on the page & find a CSS selector for that spot 3. Remove line breaks from your new code at http://removelinebreaks.net/ 4. Deliver another <script> via a GTM HTML tag on applicable pages UPDATE YOUR WEBSITE
  • 141. #MnSummit @mike_arnesen | upbuild.io 1. Write your HTML and CSS 2. Determine where you want it on the page & find a CSS selector for that spot 3. Remove line breaks from your new code at http://removelinebreaks.net/ 4. Deliver another <script> via a GTM HTML tag on applicable pages UPDATE YOUR WEBSITE #about > .col > .vc_col-sm-6:first
  • 142. #MnSummit @mike_arnesen | upbuild.io 1. Write your HTML and CSS 2. Determine where you want it on the page & find a CSS selector for that spot 3. Remove line breaks from your new code at http://removelinebreaks.net/ 4. Deliver another <script> via a GTM HTML tag on applicable pages UPDATE YOUR WEBSITE
  • 143. #MnSummit @mike_arnesen | upbuild.io 1. Write your HTML and CSS 2. Determine where you want it on the page & find a CSS selector for that spot 3. Remove line breaks from your new code at http://removelinebreaks.net/ 4. Use a <script> to combine your selector with .append() or .prepend() on applicable pages UPDATE YOUR WEBSITE
  • 144. #MnSummit @mike_arnesen | upbuild.io CHANGE PAGE CONTENT jQuery(yourSelector).prepend('<h 1 id="awesomeHeading">How do we not have an H1 yet?</h1>'); Definitely this easy. ;-) codepen.io/mike_arnesen/pen/GEvyYX
  • 145. #MnSummit @mike_arnesen | upbuild.io Goal: Bury some treasure for those who might come looking. Encourage them to apply within. GEEKY RECRUITING
  • 146. #MnSummit @mike_arnesen | upbuild.io Goal: Bury some treasure for those who might come looking. Encourage them to apply within. GEEKY RECRUITING Approach: Use GTM to print out a message in the developer console and link to our jobs page.
  • 147. #MnSummit @mike_arnesen | upbuild.io 1. Come up with your message 2. Format according to these specs 3. Test in your own console 4. Deploy as a custom tag through GTM 5. Wait for awesome applicants to come knocking GEEKY RECRUITING
  • 148. #MnSummit @mike_arnesen | upbuild.io 1. Come up with your message 2. Format according to these specs 3. Test in your own console 4. Deploy as a custom tag through GTM 5. Wait for awesome applicants to come knocking GEEKY RECRUITING
  • 149. #MnSummit @mike_arnesen | upbuild.io 1. Come up with your message 2. Format according to these specs 3. Test in your own console 4. Deploy as a custom tag through GTM 5. Wait for awesome applicants to come knocking GEEKY RECRUITING
  • 150. #MnSummit @mike_arnesen | upbuild.io 1. Come up with your message 2. Format according to Chrome’s specs 3. Test in your own console 4. Deploy as a custom tag through GTM 5. Wait for awesome applicants to come knocking GEEKY RECRUITING
  • 151. #MnSummit @mike_arnesen | upbuild.io 1. Come up with your message 2. Format according to Chrome’s specs 3. Test in your own console 4. Deploy as a custom tag through GTM 5. Wait for awesome applicants to come knocking GEEKY RECRUITING
  • 152. #MnSummit @mike_arnesen | upbuild.io PRINT CONSOLE MESSAGES console.info( "%cOne of us!! n%cIt looks like you love poking around in the console. Us, too!…", "color: blue; font-size: 25px;text-transform: uppercase;", "color: green; font-size: 12px;" ); codepen.io/mike_arnesen/pen/owepqe
  • 153. PARTING THOUGHTS AS WE WRAP UP #MnSummit @mike_arnesen | upbuild.io
  • 154. #MnSummit @mike_arnesen | upbuild.io TACKLE ANY GTM CHALLENGE 1. Define the goal first 2. Determine where in GA you want data to go 3. Establish a data-labeling convention 4. Understand the available components & functions 5. Test, fail, learn, repeat 6. Learn more JavaScript
  • 155. #MnSummit @mike_arnesen | upbuild.io TROUBLESHOOT ANYTHING IN GTM 1. Use preview mode liberally 2. Run your code in the dev tools console 3. Is the tag firing too soon or too late? 4. Read blog posts and comment with questions 5. When all else fails, StackOverflow
  • 156. #MnSummit @mike_arnesen | upbuild.io QUICK TIPS & TOOLS 1. Cmd + Click to follow links without leaving the page 2. Use GTM Injector to access preview mode without having a container live on the site 3. Use GTM Sonar to see how/if clicks & forms register 4. Scroll Depth Tracking by Parsnip.co 5. YouTube Tracking on Cardinal Path
  • 157. #MnSummit @mike_arnesen | upbuild.io DIG DEEPER 1. Google Tag Manager Fundamentals 2. Simo Ahava’s Blog 3. UpBuild’s Blog 4. MeasureSchool on YouTube
  • 158. #MnSummit @mike_arnesen | upbuild.io THANK YOU! GET THIS DECK: BIT.LY/GTM-CRASH-COURSE READ OUR BLOG: UPBUILD.IO/BLOG FOLLOW ME: @MIKE_ARNESEN | MIKEARNESEN.COM