How To Defeat The BeastSafely migrate from Classic,Universal, to Google Tag Manager.#AIM 5 #heweb17
Sylvia E. NicosiaFarmingdale State College@synicosiaFollow Slides at: https://www.slideshare.net/SylviaNavarroNicosia/how-to-defeat-the-beast
Day Of The Dead "Horse and Rider" Instant Digital Download Printable Art jpeg Print Mexican Folk Artist J Ellisonhttps://www.etsy.com/transaction/1334132909
Analytics…in Higher Ed
ALL ANALYTICS TOOLSSERVE THEIR PURPOSE
Ga.js
Analyt
ics.
jsGtm
.js
Web
trends
yoas
t
Google A
nalyt
ics
Hubspot
hs-an
alyt
ics.
net
Google c
lass
ic
piwik
SiteIm
prove
Hotjar
Google U
niver
sal
Google A
dWord
s
Quantc
ast
Monst
erIn
sights
Twitt
er
Google T
ag m
anag
er
quintly
Klout
Open w
eb a
nalyt
ics
Simply
mea
sure
d
GUI DESIG
N
Cyfe
fbq.p
ush
WP P
lugin
Acquia
Lift
bitly
clic
ky
sim
ilarw
eb
SEMru
sh
____
COMMON DENOMINATOR IN HIGHER ED
analytics.js gtm.js
Google Analytics
AnalyticsGoogle
Analytics
+ga.js _______ ____
Classic Analytics
Google TagManager
Universal Analytics
WHAT’S EVERYBODY IN HIGHEDWEB USING?
*As of August, 24, 2017
97%Google Analytics
GOOGLE ANALYTICSSTATISTICS
g of institutions and companies attending HighEdWeb 2017 use Google Tag Manager (gtms.js)
use Google Universal Analytics (analytics.js).
use Google Classic Analytics (ga.js).
40% 31% 11%
GOOGLE ANALYTICSSTATISTICS
Universal and GTM Classic and Universal
Classic, Universal, and GTM
9% 2% 1%Classic and GTM
3%
GOOGLE ANALYTICS STATISTICS
g use Google Universal Analytics.
use Google Classic Analytics.
31% 11%
Should you migrate?
CLASSIC ANALYTICS
Uses old tracking code ga.js Javascript library
Google Analytics properties were transferred to Universal Analytics, however it’s unclear what will happen to those properties which are still utilizing the old tracking code
Misses features from Universal Analytics such as User ID
Google can make old tracking script stop working at any time
Needs custom JavaScript tags to track events
<a href="http://farmingdale.edu/catalog.pdf" onClick="_gaq.push(['_trackEvent', ' PDF Downloads', ‘Click', ’Catalog');">Catalog</a>
UNIVERSAL ANALYTICS
Uses tracking code analytics.js Javascript library
All new Properties use it
Enjoys cool features from Universal
Connect multiple devices, sessions, and engagement data with the User ID.
Still needs custom JavaScript tags to track events
<a href="http://farmingdale.edu/catalog.pdf" onClick="ga(‘send’, ‘event’, ‘ PDF Downloads’, ‘Click’, ‘Catalog’);”>Catalog</a>
GOOGLE TAG MANAGER GTM
Uses tracking code gtm.js Javascript library
GTM does not replace your analytics, but helps you easily add/manage JS tracking code (tags) to your website
Minimal amount of coding for more complex tags
Built-in debug feature, preview mode
Built-in variables and tags, plus you can make your own
Event tracking: No more custom JavaScript tags on your site
<a href="http://farmingdale.edu/catalog.pdf" class=“gtm-catalog”>Catalog</a>
IS IT ONE BETTER THAN THE OTHER ONE?
Classic
Universal
GTM
Day Of The Dead "See No Evil, Hear No Evil, Speak No Evil" 8x10" Art Print Poster Mexican Folk Artist J Ellison. https://www.etsy.com/transaction/1334132911
THE ISSUE IS IN THE MIGRATION
Migration Classic Universal GTM
m c u g=
YOU MAY BE TEMPTED TO…Classic GA Property ID Number
Universal GA Universal ID Number
GTM Google Tag Manager
UA-XXXX123-1
UA-XXXX123-1
Your Website
WHAT COULD GO WRONG?
Bad or inflated data by conflicting or overlapping code (i.e., using the same property ID all along)
No data on any view in your property.
No data at all! (i.e., not testing properly)
Data from Goals and Events can stop while the code is switched (i.e., gap between deleting old code and new).
bad Really bad Very Extremely Mega Bad
THERE’S A SAFE, ALTERNATE SOLUTION
The “Parallel” testing with a migration plan
gtm.js
ga.js
or
analytics.js
Property A
Property B
WHERE YOUR DATA REMAINS CONSTANT
Your current data:
YOU SHOULDCONSIDER MIGRATING IF…
Classic Analytics Universal Analytics
+20 Custom Tags Manage•Facebook tags •Twitter tags•AdWords•Any other custom HTML/JavaScript code•Make your life easier
You Should Consider Google Tag Manager IF…
OLÉ
An this is how it’s DONE.Day Of The Dead "The Bullfighter" 8x10" Art Print Poster Mexican Bull Matador Multiple Sizes Available Folk Artist J Ellison. https://www.etsy.com/transaction/1324512636
STEP 1: NEW PROPERTY
1Create a NEW Property in Google Analytics and recreate all views/filters from your current GA Property.
Current Property
UA-XXXX123-1
Testing Property
UA-XXXX123-2
HOW GOOGLE TAG MANAGER WORKS…
1. Tag: A snippet of code (usually JavaScript) added to a page.
2. Trigger: Defines when and where tags are executed.
3. Variable: Used to receive or store information to be used by tags and triggers.
GTM has pre-defined variables like:
Page URL: returns the full URL of the current page (http://www.farmingdale.edu/about)
And you can build your own tags & variables.
STEP 2: CREATE CONTAINER IN GTM
2
Current UA-XXXX123-1
* Useful Tip: Use same name as your GA Property
Testing UA-XXXX123-2
UA-XXXX123-2
STEP 3: SETUP YOUR PAGE VIEW TAG WITH NEW VARIABLE
3
STEP 4: INSTALL GTM CODE
4 Testing PropertyUA-XXXX123-2
Current Property UA-XXXX123-1
CURRENT PROPERTY + TESTING PROPERTY
Current Property: UA-XXXX123-1
Testing Property: UA-XXXX123-2
PREVIEW AND DEBUG MODE
Testing Property
UA-XXXX123-2
PUBLISH YOUR CONTAINER
STEP 5: WHILE YOU START COLLECTING DATA, REVIEW EVENTS
5Review your Events. This is the best time to do an extensive inventory to find a common ground:
•How many and where are they located?
•Which Events will you keep?
•Which ones to modify?
•Which ones to remove?
EVENT INVENTORY
WE ARE AMONG THE TOP 50 DESIGN AGENCIES IN THE UK.
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae
vitae dicta sunt explicabo.
EVENTS WITH UNIVERSAL<li>
<a href="https://www.farmingdale.edu/about/contact-us.shtml" class="btn btn-default .btn-sm btn-block call-to-action-gtm” onclick="ga('send', 'event', 'Footer Call to Action Buttons', 'click-contact-us', 'Footer Contact Us /about/contact-us.shtml', 10, {'nonInteraction': 1});”> <i class="fa fa-comment-o fa-fw"></i> Contact Us</a>
</li>
Event Category: Footer Call to Action Buttons
Event Action: click-contact-us
Event Label: Footer Contact Us /about/contact-us.shtml
CONFIGURE EVENT TAG IN GTM
Same category name
EVENT WITH GOOGLE TAG MANAGER<li> <a href=https://www.farmingdale.edu/about/contact-us.shtml onclick="ga('send', 'event', 'Footer Call to Action Buttons', 'click-contact-us', 'Footer Contact Us /about/contact-us.shtml', 10, {'nonInteraction': 1});” class="btn btn-default .btn-sm btn-block call-to-action-gtm”> <i class="fa fa-comment-o fa-fw"></i> Contact Us</a></li>Event Category: Footer Call to Action ButtonsEvent Action: {{Click URL}} https://www.farmingdale.edu/about/contact-us.shtmlEvent Label: {{Page Path}} /Trigger: When Click Classes matches RegEx (call-to-action-gtm)
COMPARE DATA RESULTSCurrent Property UA-XXXX123-1
Testing Property UA-XXXX123-2
TRACKING DOWNLOAD FILES IN GTMDownload Links Setup in Universal Analytics
MEANWHILE IN GTM…
CHECK GTM PREVIEW MODE
CHECK EVENTS IN GA REAL TIME
YOU’LL GET MORE DETAIL DATA
With ZERO NADA code
STEP 6: REVIEW YOUR GOALS
6Just like with Events, do another inventory for all your Goals:
•All Goals per View
•Which Goals need adjustment since some Events’ actions and labels changed
•Different from Events, Goals will need to individually be modified in ALL views.
GOAL INVENTORYCurrent Property Testing Property
GOAL SETUP IN GA DASHBOARD
Current UA-XXXX123-1 Testing UA-XXXX123-2
*In all views
GOAL RESULTS
Current UA-XXXX123-1 Testing UA-XXXX123-2
1,426 conversions 1,796 conversions
STEP 7: REVIEW DATA, MAKE ADJUSTMENTS
7Testing UA-XXXX123-2
Current UA-XXXX123-1
Current UA-XXXX123-1 Testing UA-XXXX123-2
STEP 8: PLAN FOR MIGRATION
8• After testing your data and you’re confident
you have the results you want, it’s time to plan for the migration.
• The migration/upgrade consists of:
• Remove all existing Universal code (tracking code and event tracking code).
• Switching GTM variable from Testing UA-XXXX123-2 to Current UA-XXXX123
• Set an official (realistic) date and timeline for the migration.
REMOVE ALL CUSTOM EVENT TAGS
An audit may be helpful to find them all.
All matches will have to be deleted.
MAKE SURE OLD EVENT TRACKING CODE IS REMOVED!
<li> <a href=https://www.farmingdale.edu/about/contact-us.shtml onclick="ga('send', 'event', 'Footer Call to Action Buttons', 'click-contact-us', 'Footer Contact Us /about/contact-us.shtml', 10, {'nonInteraction': 1});” class="btn btn-default .btn-sm btn-block call-to-action-gtm”> <i class="fa fa-comment-o fa-fw"></i> Contact Us</a></li>
<li> <a href=https://www.farmingdale.edu/about/contact-us.shtml class="btn btn-default .btn-sm btn-block call-to-action-gtm”> <i class="fa fa-comment-o fa-fw"></i> Contact Us</a></li>
DAY OF SWITCH: REMOVE ALL CUSTOM TAGS
Remove the GA code for Classic/Universal Analytics and schedule pages to publish on merge date.
Leave your GTM code intact
Remove all instances of Classic/Universal custom tags code and set pages to publish on merge date.
STEP 9: ON MERGE DATE, SWITCH PROPERTY ID IN GTM VARIABLE
9From Testing UA-XXXX123-2
To Current UA-XXXX123-1
MAKE SURE NOW YOU’RE TRACKING UAXXXX123-1
Current Property UA-XXXX123-1
STEP 10: PUBLISH YOUR CONTAINER
10Publishing both pages and GTM container must be done at the same time. Any gap or overlapping when switching can affect your data!
CHECK WITH GTM PREVIEW MODE
Check that all your tags are firing and passing the right variables
CHECK WITH GA REAL TIME
Check that you events and Goals are working properly
Keep closed monitoring in the next 48 hours
YOUR MAIN PROPERTY DATA CONTINUES…
Current Property A: UA-XXXX123-1
Testing Property B: UA-XXXX123-2
That’s it!
ReviewQuick
CONSIDER UPDATING/MIGRATING IF…
You are using Classic Analytics
You are using Universal Analytics and you have at least 20 custom JavaScript tags on your website
You want to manage your Facebook tags, Twitter tags, AdWords, event tags, and any other custom HTML/JavaScript code
Make your life easier
STEPS FOR A SAFE MIGRATION
1. Create a new Property in GA, recreate your views.
2. Create a container in GTM.
3. Setup your tracking code with a Page View tag and a variable to store your new Property ID.
4. Install GTM code on your website along your current GA code.
5. Review your Events.
6. Review your Goals.
7. Review your collected data, make necessary adjustments.
8. Plan for upgrade: Set a date and timeline, remove GA tracking code and custom tags, set pages to auto-publish.
9. On upgrade day, switch to current Property ID in GTM variable.
10. Publish your container and monitor for the next few days.
ADVICE
Same steps apply when migrating from Classic to Universal, Classic to GTM.
Do your testing for at least two months so you’ll have data for comparison.
Schedule the switch at the end of the spring semester.
Do it on a Monday! You’ll have all week to fix any mess.
You’re welcome.
RESOURCES
Simo Ahava’s Blog
https://www.simoahava.com/
LunaMetrics
https://www.lunametrics.com/
Weber, J. (2015). Practical Google Analytics and Google Tag Manager for Developers. Berkeley, CA: Apress.
THANKYOU!
Questions?
Day Of The Dead "Street Party" Frida Kahlo and Diego Rivera, 8x10, Art Print Poster Mexican Folk Artist J Ellison. https://www.etsy.com/transaction/1334132907
Slides available at: https://www.slideshare.net/SylviaNavarroNicosia/how-to-defeat-the-beast