Download presentation
Presentation is loading. Please wait.
Published byAdi Pranoto Modified over 6 years ago
1
Level up your Google Analytics with Google Tag Manager
Tabatha Farney | University of Colorado Colorado Springs | 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… Holds and reports website use data.
Open GTM and show where to grab the container snippet. First tag config as well. Open up preview and show it working. Holds and reports website use data. Collects website use data and sends it to Google Analytics.
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',' ga('create', 'UA ', '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= ' })(window,document,'script','dataLayer',' GTM-ZTQHBF8');</script> <!-- End Google Tag Manager --> <!-- Google Tag Manager (noscript) --> <noscript><iframe src=" 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
Tag Script. Trigger Tells script when to fire. Variable Piece of data.
12
Creating Your First Tag
13
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)
14
Testing Your Tags Previewing your tags
Check Google Analytics’ Real-Time reports
15
Event Tracking in GTM
16
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! Even if you are familiar with event tracking, its good to talk about how useful it is! It is extremely powerful because it can tell us what users DO on our websites.
17
Track Events Why do this? How to 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
18
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’]); Event tracking involves flagging each event w/ GA event script so GA can record the category, action, and label of the event being captured.
19
Event Info: Data about the event
category action label The type of event. Great for organizing events! What the user did. Unique identifier for the event. The nice thing about events is GA doesn’t just count the action, it collects event related information! So when a user does a specific event (action), GA can collect the category, action, and label information for that specific event. This is invaluable data! It helps you organize the events, but also lets you identify specific actions. Show an event report. Let’s go make an event tag!
20
Outbound Link Example Example time!
21
<a href= “www. isiknowledge. com” onclick=“_gaq
<a href= “ onclick=“_gaq.push([ ‘_trackEvent’, ‘outbound link’, ‘click’, ‘social sciences citation index’]);”>Social Sciences Citation Index</a> This is what the code looks like. Don’t do that!
22
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)
23
Have a GTM Plan
24
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.
25
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?
26
What is the purpose of the library catalog?
Find something
27
What information can determine if users found something in the library catalog?
28
Step 4. Configure Google Analytics to track that data.
Successful Search Failed Search Put a hold on something Requested from another library Clicked on electronic resource link Save or search result Zero search results Item unavailable Multiple searches with no action Events!
29
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.
30
Tracking Holds
31
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)
32
Tracking Failed Searches
33
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)
34
No Search Results Variable
This variable identifies the selector for GTM to look for.
35
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.
36
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.
37
Create a No Results Trigger
This Custom Event trigger will fire whenever the event called noResults is sent through the data layer.
38
Create the No Search Results Event Tag
Select Universal Analytics tag type. Select Event as track type. Select No Results trigger.
39
Wait…you want to know what the user searched for?
“Cat At Work Industry News Week Of 528 Animals,” foursaua.info,
40
Google Analytics Custom Dimension
A custom dimension is any custom data point you want to add to your Google Analytics data.
41
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
42
Create the Custom Dimension
This creates a holding space for the data in Google Analytics. Remember that index number!
43
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.
44
Add Custom Dimension info to tag
Sync that user-defined variable to the custom dimension index number in the event tag.
46
All websites are different…
…so track them differently.
47
Creating a GTM Test Environment
48
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
49
Additional Resources Farney, Tabatha Using Digital Analytics for Smart Assessment. ALA Editions, Chicago. Farney, Tabatha “Google Analytics and Google Tag Manager.” Library Technology Reports. Google Analytics Academy, Google Analytics Help Center, Google Analytics Blog,
50
Questions? Thoughts? GA Ideas?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.