1 / 50

Level up your Google Analytics with Google Tag Manager

Level up your Google Analytics with Google Tag Manager. Tabatha Farney | University of Colorado Colorado Springs | tfarney@uccs.edu | @ sharebrarian January 10, 2018. Poll Time!. Google Tag Manager Overview. Google Tag Manager (GTM) is a web service that manages scripts.

donniej
Download Presentation

Level up your Google Analytics with Google Tag Manager

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Level up your Google Analytics with Google Tag Manager Tabatha Farney | University of Colorado Colorado Springs | tfarney@uccs.edu | @sharebrarian January 10, 2018

  2. Poll Time!

  3. Google Tag Manager Overview

  4. Google Tag Manager (GTM) is a web service that manages scripts.

  5. All scripts are managed in the GTM interface (tagmanager.google.com)

  6. You need both… + Collects website use data and sends it to Google Analytics. Holds and reports website use data.

  7. x GA Tracking Code <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-1234567-1', 'auto'); ga('send', 'pageview'); </script>

  8. Replace old GA code with GTM container <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer',' GTM-ZTQHBF8');</script> <!-- End Google Tag Manager --> <!-- Google Tag Manager (noscript) --> <noscript><iframesrc="https://www.googletagmanager.com/ns.html?id=GTM-ZTQHBF8" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> Head (<head>) section. Near the top of the body (<body>) section.

  9. Why use GTM? • Easier to enhance the GA data collection process • Great test environment • No need to edit your website code • It can do more than just GA

  10. Basic GTM Terms

  11. Creating Your First Tag

  12. Universal Analytics Pageviews Tag Tag’s Purpose: Syncs your Google Analytics tracking ID to every webpage on your website. To do this, you need: • 1 tag (Universal Analytics tag) • 1 trigger (All Pages trigger) • 1 variable (Google Analytics setting variable)

  13. Testing Your Tags • Previewing your tags • Check Google Analytics’ Real-Time reports

  14. Event Tracking in GTM

  15. Events What is it? event = user action Some examples: • Clicks on links • Form submissions • Video plays • File downloads • Pageviews longer than xx seconds • Clicks on anything!

  16. Track Events Why do this? • Finally know what users are doing on your website • More accurate bounce rate How to do this? • Regular Google Analytics way • Google Tag Manager way

  17. Regular Google Analytics Method Add the event tracking script to each event you want to track. _gaq.push([‘_trackEvent’, ‘Event Category’, ‘Event Action’, ‘Event Label’]);

  18. Event Info: Data about the event

  19. Outbound Link Example

  20. <a href= “www.isiknowledge.com” onclick=“_gaq.push([ ‘_trackEvent’, ‘outbound link’, ‘click’, ‘social sciences citation index’]);”>Social Sciences Citation Index</a>

  21. Outbound Link Event Tag Tag’s Purpose: Tracks all outbound links on a website. To do this, you need: • 1 tag (Universal Analytics tag) • 1 trigger (custom Click trigger) • 2 variables (Google Analytics setting variable and Click URL variable)

  22. Have a GTM Plan

  23. When you intentionally track website use data, you are more likely to actually use that data to drive decisions. “Entre nos,” by Andres Hoyos, flickr.com.

  24. Develop an Analytics Strategy The steps: • Identify the purpose of the website. • Select the data points to measure the website’s purpose. • Is there anyone else that could use the data from the website?

  25. What is the purpose of the library catalog? Find something

  26. What information can determine if users found something in the library catalog?

  27. Step 4. Configure Google Analytics to track that data. Events!

  28. GTM Event Tracking Process • What action do you want to track? • How can GTM identify that action? The web developer tools in your web browser are essential in this process.

  29. Tracking Holds

  30. Hold Event Tag Tag’s Purpose: Tracks when a user clicks the hold button in the library catalog. To do this, you need: • 1 tag (Universal Analytics tag) • 1 trigger (custom Click trigger) • 2 variables (Google Analytics setting variable and Click URL variable)

  31. Tracking Failed Searches

  32. Failed Search Event Tag Tag’s Purpose: Tracks when a user clicks the hold button in the library catalog. To do this, you need: • 2 tags (Custom HTML tag and Universal Analytics tag) • 2 triggers (custom event trigger and ) • 2 variables (DOM variable and Google Analytics setting variable)

  33. No Search Results Variable This variable identifies the selector for GTM to look for.

  34. GTM Data Layer Data Layer = a JavaScript array to store information and send that data to GTM. Good news everybody! You can store any data point you want in the data layer…. You just need to know HTML, DOM, and JavaScript.

  35. Create a “Listening Tag” Select Custom HTML tag type. Add a script that pushes event info into the GTM data layer. Select All Pages trigger.

  36. Create a No Results Trigger This Custom Event trigger will fire whenever the event called noResults is sent through the data layer.

  37. Create the No Search Results Event Tag Select Universal Analytics tag type. Select Event as track type. Select No Results trigger.

  38. Wait…you want to know what the user searched for? “Cat At Work Industry News Week Of 528 Animals,” foursaua.info, http://foursaua.info/cat-at-work/cat-at-work-industry-news-week-of-528-animals/

  39. Google Analytics Custom Dimension A custom dimension is any custom data point you want to add to your Google Analytics data.

  40. Configuring Custom Dimensions Why do this? • Track any data point on your website you want to analyze with website use data How to do this? • Create the custom dimension in Google Analytics Admin area • Create the user defined variable to capture the custom dimension • Add custom dimension information to your event tag

  41. Create the Custom Dimension This creates a holding space for the data in Google Analytics. Remember that index number!

  42. User-defined variable I used the URL user-defined variable that looks at the page url. In this example, this variable grabs and stores the query part of the url.

  43. Add Custom Dimension info to tag Sync that user-defined variable to the custom dimension index number in the event tag.

  44. All websites are different… …so track them differently.

  45. Creating a GTM Test Environment

  46. Transitioning to GTM Run both Google Analytics and GTM at the same time BUT also: • Create a new test GA account and property (new UA-xxxxxx-xx) • Create a new GTM container and add to your website • Sync that new test GA property to the new GTM container

  47. Additional Resources • Farney, Tabatha. 2018. Using Digital Analytics for Smart Assessment. ALA Editions, Chicago. • Farney, Tabatha. 2016. “Google Analytics and Google Tag Manager.” Library Technology Reports. https://journals.ala.org/index.php/ltr/issue/view/613 • Google Analytics Academy, https://analyticsacademy.withgoogle.com/ • Google Analytics Help Center, https://support.google.com/analytics/?hl=en#topic=3544906 • Google Analytics Blog, http://analytics.blogspot.com/

  48. Questions? Thoughts? GA Ideas?

More Related