tricks and tweaks for google analytics and google tag manager
TRANSCRIPT
Reaktor Mannerheimintie 2 00100, Helsinki Finland
tel : +358 9 4152 0200 www.reaktor.com [email protected]
Confidential ©2015 Reaktor All r ights reser ved
Tweaks and tricks For Google Tag Manager and Google Analytics
@SimoAhava | #GAUC15 | 17 June 2015
Simo AhavaSenior Data Advocate, Reaktor
@SimoAhava | #GAUC15 | 17 June 2015
Google Developer Expert, Google Analytics
Blogger, developer, www.simoahava.com
Twitter-er, @SimoAhava
Google+:er, +SimoAhava
Plug-and-play AnalyticsStop. Stop doing it. Stop it now.
@SimoAhava | #GAUC15 | 17 June 2015
Google Analytics is a tool designed to work for
9,352,458* different businesses.
* Author’s estimate, not an official figure
@SimoAhava | #GAUC15 | 17 June 2015
It is thus conceivable Google doesn’t know what your business
objectives are.@SimoAhava | #GAUC15 | 17 June 2015
23.75 %@SimoAhava | #GAUC15 | 17 June 2015
23.75 %Dear CMO, last month, the Ecommerce Conversion Rate on our site
was…
…which is an uplift of 3.45% compared to the previous month!
@SimoAhava | #GAUC15 | 17 June 2015
2,342,566Dear CMO, last month, the number of sessions to our site was…
…which is an uplift of 3.45% compared to the previous month!
Digital Analytics Café 20-May-2015 | @SimoAhava
Definition of a Session• Group of interactions that takes place on a website…
• That expires after 30 minutes of inactivity…
• Or at the end of they day…
• Or when acquisition campaign changes…
• Unless the referral is in the Referral Exclusion List…
• Or traffic is cross-domain, and cross-domain tracking is implemented…
• Unless it’s implemented incorrectly…
• Which is likely since it’s so !#/%(“% difficult…
• Unless you’re using Google Tag Manager…
• Except if you’ve implemented THAT incorrectly…
@SimoAhava | #GAUC15 | 17 June 2015
All metrics and dimensions used by a platform subscribe to the schemas of said platform!
GPeC Summit 11-May-2015 | @SimoAhava
All metrics and dimensions used by a platform subscribe to the schemas of said platform!
GPeC Summit 11-May-2015 | @SimoAhava
Sessionization Schema
This has two major implications on how we collect, process, and
analyse the data.
@SimoAhava | #GAUC15 | 17 June 2015
Stay away from aggregate metrics.1
@SimoAhava | #GAUC15 | 17 June 2015
Stay away from aggregate metrics.Combine, segment,visualize, predict.1
@SimoAhava | #GAUC15 | 17 June 2015
Plug-and-play metrics are crap. Data must be collected and reported in a meaningful way.2
@SimoAhava | #GAUC15 | 17 June 2015
Tweaks & TricksTo improve data quality at data collection time.
@SimoAhava | #GAUC15 | 17 June 2015
Trick 1: Add true hit timestamp
@SimoAhava | #GAUC15 | 17 June 2015
Create a Custom Dimension
GA
@SimoAhava | #GAUC15 | 17 June 2015
Custom JavaScript Variable to calculate ISO time
GTM
@SimoAhava | #GAUC15 | 17 June 2015
Add the Custom JavaScript Variable to your tags
GTM
@SimoAhava | #GAUC15 | 17 June 2015
http://goo.gl/fA8d0f
Trick 2: Add client Id as a dimension
@SimoAhava | #GAUC15 | 17 June 2015
Create a Custom Dimension
GA
@SimoAhava | #GAUC15 | 17 June 2015
Setup the GA tracker in a Custom HTML Tag
GTM
@SimoAhava | #GAUC15 | 17 June 2015
Add the client ID to the Tag, and fire with the Custom Event
GTM
@SimoAhava | #GAUC15 | 17 June 2015
http://goo.gl/dkkgZr
Trick 3: Add session Id as a dimension
@SimoAhava | #GAUC15 | 17 June 2015
Create a Custom Dimension
GA
@SimoAhava | #GAUC15 | 17 June 2015
Custom JS Variable to return random ID
GTM
@SimoAhava | #GAUC15 | 17 June 2015
Add the Custom JS Variable as a Custom Dimension
GTM
@SimoAhava | #GAUC15 | 17 June 2015
http://goo.gl/fA8d0f
Trick 4: Track dwell and scroll
@SimoAhava | #GAUC15 | 17 June 2015
Custom HTML Tag fires on DOM Ready
GTM
@SimoAhava | #GAUC15 | 17 June 2015
Event Tag fires when dwell & scroll recorded
GTM
@SimoAhava | #GAUC15 | 17 June 2015
http://goo.gl/AYXiki
Trick 5: Track scroll depth
@SimoAhava | #GAUC15 | 17 June 2015
Custom HTML Tag to setup the listener
GTM
@SimoAhava | #GAUC15 | 17 June 2015
Bunch of Data Layer Variables to capture the data
GTM
@SimoAhava | #GAUC15 | 17 June 2015
Event Tag to send the data to GA
GTM
@SimoAhava | #GAUC15 | 17 June 2015
https://github.com/sahava/content
Trick 6: Track content with Ecommerce
@SimoAhava | #GAUC15 | 17 June 2015
Setup Enhanced Ecommerce in the GA View
GA
@SimoAhava | #GAUC15 | 17 June 2015
Figure out the terminology
GTM
@SimoAhava | #GAUC15 | 17 June 2015
Connect interactions with the data layer
GTM
@SimoAhava | #GAUC15 | 17 June 2015
Create Tags for the individual events
GTM
@SimoAhava | #GAUC15 | 17 June 2015
Enjoy the awesomeness
GA
@SimoAhava | #GAUC15 | 17 June 2015
GA
http://goo.gl/pkQmqU
Trick 7: Block Internal Traffic
@SimoAhava | #GAUC15 | 17 June 2015
Create a Custom Dimension
GA
@SimoAhava | #GAUC15 | 17 June 2015
Create the View Filter
GA
@SimoAhava | #GAUC15 | 17 June 2015
Create a URL Query Variable
GTM
@SimoAhava | #GAUC15 | 17 June 2015
Add the Custom Dimension to a Tag
GTM
@SimoAhava | #GAUC15 | 17 June 2015
WEB
http://goo.gl/gTauIV
Trick 8: Create custom event handlers
@SimoAhava | #GAUC15 | 17 June 2015
Custom HTML Tag to setup the listener
GTM
@SimoAhava | #GAUC15 | 17 June 2015
Custom JS Variable to work as a generic handler
GTM
@SimoAhava | #GAUC15 | 17 June 2015
GTM
http://goo.gl/IViqTG
Trick 9: Track weather as a dimension
@SimoAhava | #GAUC15 | 17 June 2015
How it works
@SimoAhava | #GAUC15 | 17 June 2015
Create Custom Dimensions
GA
@SimoAhava | #GAUC15 | 17 June 2015
Custom HTML Tag to collect the data
GTM
@SimoAhava | #GAUC15 | 17 June 2015
Event Tag to send weather data to GA
GTM
@SimoAhava | #GAUC15 | 17 June 2015
http://goo.gl/3todBm
Trick 10: Track page visibility
@SimoAhava | #GAUC15 | 17 June 2015
@SimoAhava | #GAUC15 | 17 June 2015
@SimoAhava | #GAUC15 | 17 June 2015
@SimoAhava | #GAUC15 | 17 June 2015
@SimoAhava | #GAUC15 | 17 June 2015
@SimoAhava | #GAUC15 | 17 June 2015
@SimoAhava | #GAUC15 | 17 June 2015
@SimoAhava | #GAUC15 | 17 June 2015
@SimoAhava | #GAUC15 | 17 June 2015
http://goo.gl/RgA1Zh
@SimoAhava | #GAUC15 | 17 June 2015
http://goo.gl/80o1ml
BONUS: Inject semantic data for crawlers
@SimoAhava | #GAUC15 | 17 June 2015
Custom HTML Tag to inject Meta Descriptions with
GTM
http://goo.gl/1gB762
@SimoAhava | #GAUC15 | 17 June 2015
Custom HTML Tag to inject Structured Data with
GTM
http://goo.gl/YAXonr
Data is difficultIt’s supposed to be. Stop complaining.
@SimoAhava | #GAUC15 | 17 June 2015
@SimoAhava | #GAUC15 | 17 June 2015
Rule of Data Passivity
Data does nothing. Data beats nothing. Data is a passive medium that requires
an active agent (analyst) to interpret.
Rule of Data Subjectivity
Interpretation of data requires a well-formulated hypothesis. The same data set can be good for one hypothesis and
bad for another.
@SimoAhava | #GAUC15 | 17 June 2015
@SimoAhava | #GAUC15 | 17 June 2015
Rule of Data Scarcity
You will never have all the data. An arbitrary line must be drawn in data collection, and you must be aware of
this limitation at all times.
Data quality is directly proportional to how well you understand the data
collection mechanism.
@SimoAhava | #GAUC15 | 17 June 2015
2,342,566Dear CMO, last month, the number of sessions to our site was…
…which is an uplift of 3.45% compared to the previous month!
Digital Analytics Café 20-May-2015 | @SimoAhava
Thank [email protected]
www.simoahava.com
Twitter: @SimoAhava
Google+: +SimoAhava
@SimoAhava | #GAUC15 | 17 June 2015