Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Essential Search Marketing Tweaks For Google Analytics And Google Tag Manager

2,932 views

Published on

Slides from my SMX Munich 2018 talk.

How to measure engagement with the web analytics tools at our disposal?

How to turn reports more meaningful for our particular organizational idiosyncracies and goals?

How to become more critical about the data that is spoon-fed to us by the default installations of our favorite tools?

Published in: Internet
  • Nice !! Download 100 % Free Ebooks, PPts, Study Notes, Novels, etc @ https://www.thesisscientist.com/top-30-sites-for-download-free-books-2018
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Essential Search Marketing Tweaks For Google Analytics And Google Tag Manager

  1. 1. Search Marketing Tweaks
 For Google Analytics and Google Tag Manager
 SMX München - 20 March 2018 @SimoAhava from @ReaktorNow
  2. 2. Search Marketing Tweaks
 For Google Analytics and Google Tag Manager
 SMX München - 20 March 2018 @SimoAhava from @ReaktorNow
  3. 3. Simo Ahava Senior Data Advocate, Reaktor Google Developer Expert, Google Analytics Blogger, developer, www.simoahava.com Twitter-er, @SimoAhava Google+:er, +SimoAhava
  4. 4. @SimoAhava from @ReaktorNow | #SMX | 20 March 2018 Why measure content?
  5. 5. @SimoAhava from @ReaktorNow | #SMX | 20 March 2018 Why measure content? Bounce Rate and Time On Page are enough, right? Right? Hello?
  6. 6. To celebrate successTo learn from mistakes
  7. 7. To celebrate successTo plan ahead
  8. 8. To celebrate success
  9. 9. The many dimensions of engagement Visibility Interaction Dwell time Short-term goals Long-term goals Qualitative
  10. 10. The many dimensions of engagement Visibility Interaction Dwell time Short-term goals Long-term goals Qualitative Page visibility Content visibility
  11. 11. The many dimensions of engagement Visibility Interaction Dwell time Short-term goals Long-term goals Qualitative I love you Click Scroll Keypress Long press Drag Resize Highlight Copy
  12. 12. The many dimensions of engagement Visibility Interaction Dwell time Short-term goals Long-term goals Qualitative I love you SERP bounce Idle time Active time Read time
  13. 13. The many dimensions of engagement Visibility Interaction Dwell time Short-term goals Long-term goals Qualitative I love you Mailing list Favorite Print Comment Share
  14. 14. The many dimensions of engagement Visibility Interaction Dwell time Short-term goals Long-term goals Qualitative I love you $ Followers More RPU Recruitment Better rankings
  15. 15. The many dimensions of engagement Visibility Interaction Dwell time Short-term goals Long-term goals Qualitative I love you $ Buzz Feedback Session rec. Heatmaps Polls
  16. 16. The many dimensions of engagement Visibility Interaction Dwell time Short-term goals Long-term goals Qualitative I love you $
  17. 17. The many dimensions of engagement Visibility Interaction Dwell time Short-term goals Long-term goals Qualitative I love you $
  18. 18. @SimoAhava from @ReaktorNow | #SMX | 20 March 2018 Why customize?
  19. 19. @SimoAhava from @ReaktorNow | #SMX | 20 March 2018 Why customize? Google Analytics is GREAT out-of-the-box, right?
  20. 20. PAGEVIEWS
  21. 21. PAGEVIEWS BOUNCE AND CONVERSION RATE
  22. 22. PAGEVIEWS BOUNCE AND CONVERSION RATE SESSIONS
  23. 23. Google Analytics Session
  24. 24. Google Analytics Session Group of interactions that takes place on a website
  25. 25. Google Analytics Session Group of interactions that takes place on a website That expires after 30 minutes of inactivity…
  26. 26. Google Analytics Session Group of interactions that takes place on a website That expires after 30 minutes of inactivity… Or at the end of the day…
  27. 27. Google Analytics Session Group of interactions that takes place on a website That expires after 30 minutes of inactivity… Or at the end of the day… Or when acquisition campaign changes…
  28. 28. Google Analytics Session Group of interactions that takes place on a website That expires after 30 minutes of inactivity… Or at the end of the day… Or when acquisition campaign changes… Unless the referral is in the Referral Exclusion List…
  29. 29. Google Analytics Session Group of interactions that takes place on a website That expires after 30 minutes of inactivity… Or at the end of the 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…
  30. 30. Google Analytics Session Group of interactions that takes place on a website That expires after 30 minutes of inactivity… Or at the end of the 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…
  31. 31. Google Analytics Session Group of interactions that takes place on a website That expires after 30 minutes of inactivity… Or at the end of the 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…
  32. 32. Google Analytics Session Group of interactions that takes place on a website That expires after 30 minutes of inactivity… Or at the end of the 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…
  33. 33. Google Analytics Session Group of interactions that takes place on a website That expires after 30 minutes of inactivity… Or at the end of the 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…
  34. 34. Google Analytics Session Group of interactions that takes place on a website That expires after 30 minutes of inactivity… Or at the end of the 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… There’s also the sessionControl parameter…
  35. 35. Google Analytics Session Group of interactions that takes place on a website That expires after 30 minutes of inactivity… Or at the end of the 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… There’s also the sessionControl parameter… Lets not forget mobile and single-page apps!
  36. 36. Google Analytics Session Group of interactions that takes place on a website That expires after 30 minutes of inactivity… Or at the end of the 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… There’s also the sessionControl parameter… Lets not forget mobile and single-page apps! Who knows what else happens server-side?
  37. 37. Google Analytics Session Group of interactions that takes place on a website That expires after 30 minutes of inactivity… Or at the end of the 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… There’s also the sessionControl parameter… Lets not forget mobile and single-page apps! Who knows what else happens server-side? Cookies, localStorage, persistent data stores!?
  38. 38. @SimoAhava from @ReaktorNow | #2015ac | 8–11
  39. 39. @SimoAhava from @ReaktorNow | #2015ac | 8–11 X
  40. 40. All metrics and dimensions used by a platform subscribe to the definitions of said platform!
  41. 41. All metrics and dimensions used by a platform subscribe to the definitions of said platform! sessionized
  42. 42. @SimoAhava from @ReaktorNow | #SMX | 20 March 2018 Google Tag Manager
  43. 43. @SimoAhava from @ReaktorNow | #SMX | 20 March 2018 Google Tag Manager The best only way to deploy Google Analytics tracking.
  44. 44. Google Tag Manager Lets you create and deploy tracking
 and measurement scripts with ease.
  45. 45. Google Tag Manager Lets you create and deploy tracking
 and measurement scripts with ease. Facilitates interaction between various
 departments within your organization.
  46. 46. Google Tag Manager Lets you create and deploy tracking
 and measurement scripts with ease. Facilitates interaction between various
 departments within your organization. Allows you to focus your time on analysis
 rather than implementation.
  47. 47. Google Tag Manager https://analyticsacademy.withgoogle.com/course/5
  48. 48. @SimoAhava from @ReaktorNow | #SMX | 20 March 2018 Tricks and methods
  49. 49. @SimoAhava from @ReaktorNow | #SMX | 20 March 2018 Tricks and methods …for search marketing via Google Tag Manager…
  50. 50. WHY?
  51. 51. WHY? Scroll% & Read%
  52. 52. WHY? SERP Bounce Time
  53. 53. WHY? Article performance
  54. 54. WHY? Content Funnel
  55. 55. #1: Track (relevant) link clicks https://goo.gl/CBmmZt Complexity Metric impact LOW MEDIUM HIGH LOW MEDIUM HIGH
  56. 56. Trigger
  57. 57. a:not([href*="mydomain.com"]) Clicks on links that do not redirect to a page on mydomain.com. a[href$=".pdf"] Clicks on links that end with ".pdf". a[href^="mailto:"] Clicks on links that start with "mailto:". a[href*="#"] Clicks on links that jump to page anchors. 10 Useful CSS Selectors: https://goo.gl/JXv7u6
  58. 58. #2: Track (relevant) other clicks Complexity Metric impact LOW MEDIUM HIGH LOW MEDIUM HIGH
  59. 59. Trigger 10 Useful CSS Selectors: https://goo.gl/JXv7u6
  60. 60. #3: Track scroll depth Complexity Metric impact LOW MEDIUM HIGH LOW MEDIUM HIGH https://goo.gl/RjiAH1
  61. 61. Trigger
  62. 62. WORKS BEST WHEN: -- All content is included in the HTML file (no dynamic content)
 -- No single-page transitions
 -- Content fills (most of) the page from top-to-bottom See also https://goo.gl/9XrPtQ for tips on how to customize the trigger!
  63. 63. #4: Track element visibility Complexity Metric impact LOW MEDIUM HIGH LOW MEDIUM HIGH https://goo.gl/NTkTqK
  64. 64. Trigger
  65. 65. Trigger
  66. 66. #5: Track structured data as content attributes https://goo.gl/NTkTqK Complexity Metric impact LOW MEDIUM HIGH LOW MEDIUM HIGH
  67. 67. function() { var jsonLd = document.querySelector('script[type*="ld+json"]'); return jsonLd ? JSON.parse(jsonLd.innerHTML) : {}; } Custom JS Variable 1: {{JSON-LD}}
  68. 68. function() { return {{JSON-LD}}.author.name || undefined; } Custom JS Variable 2: {{JSON-LD - author.name}}
  69. 69. function() { return {{JSON-LD}}.datePublished || undefined; } Custom JS Variable 3: {{JSON-LD - datePublished}}
  70. 70. function() { return {{JSON-LD}}.headline || undefined; } Custom JS Variable 4: {{JSON-LD - headline}}
  71. 71. Google Analytics View Settings
  72. 72. Google Tag Manager - Page View Tag
  73. 73. Google Analytics - Site Content - All Pages
  74. 74. #6: Track article attributes as content groups https://goo.gl/NTkTqK Complexity Metric impact LOW MEDIUM HIGH LOW MEDIUM HIGH
  75. 75. Custom JS Variable: {{JS - Blog Images}} function() { // Make sure the selector points to your content element var content = document.querySelector('.entry-content'); var imgs = content.querySelectorAll('img').length - 1; if (imgs>20) return '21+'; else if (imgs>15) return '16-20'; else if (imgs>10) return '11-15'; else if (imgs>7) return '8-10'; else if (imgs>5) return '6-7'; else if (imgs>3) return '4-5'; else if (imgs>1) return '2-3'; else if (imgs>0) return '1'; else return '0'; }
  76. 76. Custom JS Variable: {{JS - Blog Length}} function() { // Make sure the selector matches your content element var content = document.querySelector('.entry-content'); var wCount = 0; var cText = content.textContent || content.innerText; cText = cText.replace(/(^s*)|(s*$)/gi,''); cText = cText.replace(/[ ]{2,}/gi,' '); cText = cText.replace(/n /,'n'); wCount = cText.split(' ').length; if (wCount>3000) return '3k+'; else if (wCount>2500) return '2.5k-3k'; else if (wCount>2000) return '2k-2.5k'; else if (wCount>1500) return '1.5k-2k'; else if (wCount>1100) return '1.1k-1.5k'; else if (wCount>800) return '800-1.1k'; else if (wCount>500) return '500-800'; else if (wCount>200) return '200-500'; else return '<200'; }
  77. 77. Custom JS Variable: {{JS - Blog Title Length}} function() { var title = document.title; var wCount; title = title.replace(/(^s*)|(s*$)/gi,''); title = title.replace(/[ ]{2,}/gi,' '); wCount = title.split(' ').length; if (wCount>20) return '21+'; else if (wCount>16) return '17-20'; else if (wCount>12) return '13-16'; else if (wCount>10) return '11-12'; else if (wCount>8) return '9-10'; else if (wCount>6) return '7-8'; else if (wCount>4) return '5-6'; else if (wCount>2) return '3-4'; else return '<3'; }
  78. 78. Page View Tag
  79. 79. Google Analytics - Site Content - All Pages
  80. 80. Find your happy place. Rant ahead.
  81. 81. https://support.google.com/analytics/answer/2853423?hl=en You can create up to five Content Groupings."
  82. 82. https://support.google.com/analytics/answer/2853423?hl=en You can create up to five Content Groupings."
  83. 83. https://support.google.com/analytics/answer/2853423?hl=en You can create up to five Content Groupings."
  84. 84. https://support.google.com/analytics/answer/2853423?hl=en " W You can create up to five Content Groupings.
  85. 85. https://support.google.com/analytics/answer/2853423?hl=en " W T You can create up to five Content Groupings.
  86. 86. https://support.google.com/analytics/answer/2853423?hl=en " W T F You can create up to five Content Groupings.
  87. 87. https://developers.google.com/analytics/devguides/collection/analyticsjs/custom-dims-mets There is a maximum of 20 Custom
 Dimensions (200 for Premium…)"
  88. 88. https://developers.google.com/analytics/devguides/collection/analyticsjs/custom-dims-mets There is a maximum of 20 Custom
 Dimensions (200 for Premium…)"
  89. 89. https://developers.google.com/analytics/devguides/collection/analyticsjs/custom-dims-mets There is a maximum of 20 Custom
 Dimensions (200 for Premium…)"
  90. 90. https://developers.google.com/analytics/devguides/collection/analyticsjs/custom-dims-mets There is a maximum of 20 Custom
 Dimensions (200 for Premium…)" sigh* *
  91. 91. #7: Measure SERP bounce time Complexity Metric impact LOW MEDIUM HIGH LOW MEDIUM HIGH https://goo.gl/Wn16xD
  92. 92. Total SERP Bounces
  93. 93. Total SERP Bounces Average Dwell Time Before Bounce
  94. 94. <script> (function() { var s = document.location.search; var h = document.location.hash; var e = {{Event}}; var n = {{New History Fragment}}; var o = {{Old History Fragment}}; // Only run if the History API is supported if (window.history) { // Create a new history state if the user lands from Google's SERP if (e === 'gtm.js' && document.referrer.indexOf('www.google.') > -1 && s.indexOf('gclid') === -1 && s.indexOf('utm_') === -1 && h !== '#gref') { window.oldFragment = false; window.history.pushState(null,null,'#gref'); } else if (e === 'gtm.js') { window.oldFragment = true; } // When the user tries to return to the SERP using browser back, fire the // Google Analytics timing event, and after it's dispatched, manually // navigate to the previous history entry, i.e. the SERP if (e === 'gtm.historyChange' && n === '' && o === 'gref') { var time = new Date().getTime() - {{DLV - gtm.start}}; if (!window.oldFragment) { dataLayer.push({ 'event' : 'returnToSerp', 'timeToSerp' : time, 'eventCallback' : function() { window.history.go(-1); } }); } else { window.history.go(-1); } } } })(); </script> Custom HTML Tag
  95. 95. Triggers for the Custom HTML Tag + All Pages
  96. 96. Data Layer Variables
  97. 97. Trigger for the Event Tag
  98. 98. Custom JS Variable: {{JS - SERP Time In Seconds}} function() { return {{DLV - timeToSerp}} < 1800000 ? {{DLV - timeToSerp}} / 1000 : undefined; }
  99. 99. GA Admin -> Property Settings -> Custom Definitions -> Custom Metrics
  100. 100. Event Tag
  101. 101. GA View Settings -> Calculated Metrics
  102. 102. Custom Report
  103. 103. Total SERP Bounces
  104. 104. Total SERP Bounces Average Dwell Time Before Bounce
  105. 105. #8: Measure content interactive time https://goo.gl/6HciRy Complexity Metric impact LOW MEDIUM HIGH LOW MEDIUM HIGH
  106. 106. Average engagement = Time when user is actively interacting with the page (keyboard and mouse)
  107. 107. Average engagement = Time when user is actively interacting with the page (keyboard and mouse) = 8 x = 6 x = 5 x = 5 x = 6 x = 6 x = 5 x = 3 x = 6 x = 6 x
  108. 108. <script> (function() { var startEngage = new Date().getTime(); var timeEngaged = 0; var idleTime = 0; var idle = true; var idleReport = false; var idleTimer, reportTimer; /* Set the user as idle, and calculate the time they were non-idle */ var setIdle = function() { idleTime = new Date().getTime(); timeEngaged += idleTime - startEngage; idle = true; }; /* Reset the 5 second idle timer. If the user was idle, start the non-idle timer */ var pulse = function(evt) { if (idle) { idle = false; startEngage = new Date().getTime(); idleReport = false; } window.clearTimeout(idleTimer); idleTimer = window.setTimeout(setIdle, 5000); }; // Utility function for attaching listeners to the window var addListener = function(evt, cb) { if (window.addEventListener) { window.addEventListener(evt, cb); } else if (window.attachEvent) { window.attachEvent('on' + evt, cb); } }; /* Push an event to dataLayer every 15 seconds unless the user is idle. Also, push an event when the user leaves the page */ var report = function(evt) { if (!idle) { timeEngaged += new Date().getTime() - startEngage; } // Push the payload to dataLayer, and only push valid time values if (!idleReport && timeEngaged > 0 && timeEngaged < 3600000) { window.dataLayer.push({ 'event' : 'nonIdle', 'nonIdleTimeElapsed' : timeEngaged }); } if (idle) { idleReport = true; } // Fix possible beforeunload duplication problem if (evt && evt.type === 'beforeunload') { window.removeEventListener('beforeunload', report); } timeEngaged = 0; startEngage = new Date().getTime(); reportTimer = window.setTimeout(report, 15000); }; addListener('mousedown', pulse); addListener('keydown', pulse); addListener('scroll', pulse); addListener('mousemove', pulse); addListener('beforeunload', report); idleTimer = window.setTimeout(setIdle, 5000); reportTimer = window.setTimeout(report, 15000); })(); </script> Custom HTML Tag
  109. 109. Trigger for the Custom HTML Tag
  110. 110. Data Layer Variable
  111. 111. Custom JS Variable: {{JS - Get Engagement Time In Seconds}} function() { return {{DLV - nonIdleTimeElapsed}} / 1000; }
  112. 112. GA: New Custom Metric
  113. 113. Trigger for the Event Tag
  114. 114. Event Tag
  115. 115. GA: New Calculated Metric
  116. 116. GA: New Custom Report
  117. 117. Average engagement = Time when user is actively interacting with the page (keyboard and mouse)
  118. 118. Average engagement = Time when user is actively interacting with the page (keyboard and mouse) = 8 x = 6 x = 5 x = 5 x = 6 x = 6 x = 5 x = 3 x = 6 x = 6 x
  119. 119. #9: Track content as Ecommerce https://goo.gl/EiuayM Complexity Metric impact LOW MEDIUM HIGH LOW MEDIUM HIGH
  120. 120. #9: Track content as Ecommerce https://goo.gl/EiuayM Complexity Metric impact LOW MEDIUM HIGH LOW MEDIUM HIGH
  121. 121. Impressions: Element Visibility
  122. 122. Product Detail View: Article opened
  123. 123. Add To Cart: Initial scroll
  124. 124. Checkout: Scroll depth 33%, 66%, 100% } } } Step 1 Step 2 Step 3
  125. 125. Purchase: Scroll depth 100% and 1 minute engagement
  126. 126. Site engagement
  127. 127. Site engagement Articles opened Articles scrolled Articles scrolled past 33% Articles "read"
  128. 128. Article engagement
  129. 129. Total words read Article engagement
  130. 130. Total words read Avg. length of article Article engagement
  131. 131. Total words read Avg. length of article Scroll-to-open % Article engagement
  132. 132. Total words read Avg. length of article Scroll-to-open % Read-to-open % Article engagement
  133. 133. @SimoAhava from @ReaktorNow | #SMX | 20 March 2018 Data is difficult
  134. 134. @SimoAhava from @ReaktorNow | #SMX | 20 March 2018 Data is difficult Data quality is earned, not acquired.
  135. 135. simo.ahava@reaktor.com www.simoahava.com Twitter: @SimoAhava Google+: +SimoAhava

×