Practical Google Analytics and Google Tag Manager for Developers (eBook)

(Autor)

eBook Download: PDF
2015 | 1st ed.
XXII, 269 Seiten
Apress (Verlag)
978-1-4842-0265-4 (ISBN)

Lese- und Medienproben

Practical Google Analytics and Google Tag Manager for Developers - Jonathan Weber
Systemvoraussetzungen
79,99 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen

Maybe you're starting from scratch with a brand new Web site and wondering, 'What's the best way to go about implementing Google Analytics?' Even more likely, you're scratching your head over someone else's aging and completely undocumented implementation and wondering what it's actually doing-and not doing. You need to turn things around.

The instructions for Google Analytics seem easy enough-just copy and paste this little snippet of code, right? But as Practical Google Analytics for Developers shows, using stale code won't give you what you're really after: who is visiting your site, what they want, and what their behavior reveals. After all, the more you know about your particular users, the better you can serve their needs and turn them into buyers.

Written by data evangelist and Google Analytics expert Jonathan Weber, this book offers foundational knowledge, a collection of practical recipes, well-tested best practices, and troubleshooting tips to get your implementation in tip-top condition. Among other things, it covers:

  • Basic Google Analytics implementation
  • How to customize Google Analytics for your unique situation
  • How to use Google Tag Manager
  • How to track and analyze all interactions across multiple devices and touchpoints
  • How to extract data from Google Analytics and use Google BigQuery to analyze Big Data questions

There's a reason that `so many organizations use Google Analy

tics. Whether you're a marketer with development skills or a full-on Web developer/analyst, Practical Google Analytics for Developers will show you how to implement GA from scratch on a new web site or reengineer or enhance a GA account you have inherited. The result? You will reduce customer acquisition costs, turn visitors into customers, get priceless feedback on your new product initiatives, and gain insights that will grow your customer or client base like never before.

What You'll Learn

  • Implementation approaches for Google Analytics, including common pitfalls and troubleshooting strategies.
  • How to use tools like Google Tag Manager and jQuery to jumpstart your Google Analytics implementation.
  • How to track metrics beyond page views to other critical user interactions, such as clicks on outbound links or downloads, scrolling and page engagement, usage of AJAX forms, and much more.
  • How to incorporate additional, customized data into Google Analytics to track individual users or enrich data about their behavior.

Who This Book Is For

Web developers, data analysts, and marketers with a basic familiarity with Google Analytics from an end-user perspective, as well as some knowledge of HTML and JavaScript.



Jonathan Weber is the Data Evangelist at LunaMetrics. He spreads the principles of analytics through training seminars on Google Analytics and related topics, and works with clients on challenging strategic issues in measuring and interpreting analytics data. He holds a master's degree from the University of Pittsburgh School of Information Sciences. When he's not in front of the computer poring over data, you can find him out in the sunshine as the co-founder of sustainable urban flower farm greenSinner, located in Pittsburgh.


Whether you're a marketer with development skills or a full-on web developer/analyst, Practical Google Analytics and Google Tag Manager for Developers shows you how to implement Google Analytics using Google Tag Manager to jumpstart your web analytics measurement.There's a reason that so many organizations use Google Analytics. Effective collection of data with Google Analytics can reduce customer acquisition costs, provide priceless feedback on new product initiatives, and offer insights that will grow a customer or client base. So where does Google Tag Manager fit in?Google Tag Manager allows for unprecedented collaboration between marketing and technical teams, lightning fast updates to your site, and standardization of the most common tags for on-site tracking and marketing efforts. To achieve the rich data you're really after to better serve your users' needs, you'll need the tools Google Tag Manager provides for a best-in-class implementation of Google Analytics measurement on your site.Written by data evangelist and Google Analytics expert Jonathan Weber and the team at LunaMetrics, this book offers foundational knowledge, a collection of practical Google Tag Manager recipes, well-tested best practices, and troubleshooting tips to get your implementation in tip-top condition. It covers topics including:* Google Analytics implementation via Google Tag Manager* How to customize Google Analytics for your unique situation* Using Google Tag Manager to track and analyze interactions across multiple devices and touch points* How to extract data from Google Analytics and use Google BigQuery to analyze Big Data questionsWhat You'll LearnImplementation approaches for Google Analytics, including common pitfalls and troubleshooting strategies.How to use tools like Google Tag Manager and jQuery to jumpstart your Google Analytics implementation.How to track metrics beyond page views to other critical user interactions, such as clicks on outbound links or downloads, scrolling and page engagement, usage of AJAX forms, and much more.How to incorporate additional, customized data into Google Analytics to track individual users or enrich data about their behavior. Who This Book Is ForWeb developers, data analysts, and marketers with a basic familiarity with Google Analytics from an end-user perspective, as well as some knowledge of HTML and JavaScript.  

Jonathan Weber is the Data Evangelist at LunaMetrics. He spreads the principles of analytics through training seminars on Google Analytics and related topics, and works with clients on challenging strategic issues in measuring and interpreting analytics data. He holds a master’s degree from the University of Pittsburgh School of Information Sciences. When he's not in front of the computer poring over data, you can find him out in the sunshine as the co-founder of sustainable urban flower farm greenSinner, located in Pittsburgh.  

Contents at a Glance 5
Contents 7
Foreword 15
About the Author 16
Acknowledgments 17
Introduction 18
Part I: Implementing Google Analytics with Google Tag Manager 20
Chapter 1: Google Analytics Fundamentals 21
GA Account Structure and Administration 21
Getting a Google Login 21
Google Analytics Structure 22
Administration and Access Controls 23
Google Analytics Premium Properties 23
How Google Analytics Collects Data 24
Hits, Sessions, and Users 24
Privacy Considerations 25
Reports and Data Structures in GA 25
Dimensions and Metrics 25
Pre-Aggregation and Sampling 26
Row Limits 26
Sampling 26
Tool Overlap and Reconciliation 27
Google Analytics Documentation 28
Summary 28
Chapter 2: Basic Google Analytics Measurement 29
Basic Google Analytics Tracking Code 29
How the Tracking Code Works 30
Create the GA Tracker 30
Send the Pageview 30
Multiple GA Trackers 31
Arguments and Field Names 32
Getting the Code on the Page 32
Code Placement 33
Cookies and Domains 33
Choosing a Cookie Domain 33
Multiple Domains As One Site 35
Enabling Cross-Domain Tracking 35
Decorating Links 36
Summary 36
Chapter 3: Introducing Google Tag Manager 37
Why Use a Tag Manager? 37
How Does Google Tag Manager Work? 38
Creating a GTM Account 38
GTM Account Structure 38
GTM Permissions 39
GTM Container Script 39
The Building Blocks of GTM 40
Tags 41
Triggers 41
Variables 42
Basic Page Attribute Variables 43
Page Content Variables 43
User Interaction Variables 44
GTM Attribute Variables 44
Other Variable Types 44
Providing Data to GTM with a Data Layer 44
Structure of the Data Layer 45
Filling In the Data Layer 45
Implementing GA Basics with GTM 45
What Comes Next 49
Summary 50
Chapter 4: Testing Your Implementation 51
Publishing in Google Tag Manager 51
Preview and Debug Mode 51
Publish Your Container 55
Version Management 55
Troubleshooting Tools for GA 56
Chrome Tag Assistant 56
Google Analytics Debug Mode 56
Enabling GA Debug Mode 57
Viewing GA Debug Information 57
Other Browser Tools 58
Google Analytics Real-Time Reports 59
Summary 60
Part II: Enhancing Website Data with Google Tag Manager 61
Chapter 5: Tracking Interactions with Google Tag Manager 62
Tracking Interaction in Google Analytics 62
Design Patterns for Events in GTM 64
Design Pattern 1: GTM’s Auto-Event Tracking 66
All Elements and Just Links Target Types 68
The Mechanics of Auto-Event Tracking 70
Design Pattern 2: Custom JavaScript in GTM 70
Design Pattern 3: Explicit Data Layer Events in Site Code 71
Applications of Interaction Tracking 74
Outbound Links 74
PDFs and Other Downloads 76
Mail and Phone Links 79
Tabs, Hover, Scroll, and Other Content Interactions 79
Tabs and Other In-Page Content 79
Time Spent 80
Scrolling 82
Hover and Other Interactions 88
Extending GTM’s Auto-Event Tracking Model 88
Social Interactions 88
Social Actions: Initiation vs. Completion 89
Facebook Likes 89
Video 91
Summary 96
Chapter 6: Goals: Measuring Conversions 97
Creating and Organizing Goals 98
Deleting Goals 101
Destination Goals and Funnels 101
Setting Up a Funnel 103
Testing Goal and Funnel URLs 105
Required First Step 107
Funnels Without Distinct URLs 109
Modals and iFrames 110
Forms and the Form Listener 111
AJAX and Dynamic Processes 113
The History Listener 113
Using the Click Listener 115
Flash and Other Browser Plugins 116
Conversions That Span Sessions 116
Summary 117
Chapter 7: Ecommerce: Tracking Products and Purchases 118
Basic Ecommerce Tracking 119
Ecommerce Data in the Data Layer 120
Create a Goal in GA for the Checkout Process 124
Enhanced Ecommerce Tracking 124
Enabling Enhanced Ecommerce 126
Ecommerce Data in the Data Layer Declaration 129
Product Data 130
Product Impressions 131
Product Detail View 132
Cart Additions and Removals 134
Checkout Process 134
Purchase 136
Refunds 137
Promotion Data 138
Promotion Impressions 139
Ecommerce Data on User Interactions 139
Product and Promotion Clicks 139
Explicit Data Layer Events in Site Code 140
Using GTM’s Auto-Event Tracking 142
AJAX Cart and Checkout Interactions 144
Summary 146
Chapter 8: Cleaning Up and Enriching Data 147
Tools for Cleaning Up Data 147
GTM: Blocking Triggers and Overriding Default Values 147
Blocking Triggers 148
Overriding Default Values in a Tag 148
GA: Filters and Views 149
Types of Filters 150
Predefined Filters 151
Custom Filters 151
Testing and Troubleshooting Views and Filters in GA 152
Partitioning Internal Traffic 154
Removing Internal Traffic 154
Using IP Addresses 154
Using Service Providers 158
Separating Test and Production Environments 160
Using Lookup Tables to Partition Traffic in GTM 160
Cleaning Up and Grouping Content 163
Enforcing Case in URLs 164
Default URLs 165
Query Parameters 167
Capturing the URL Fragment 169
Viewing Hostnames for Subdomains and Cross Domains 170
Site Search 173
Grouping Content 177
Grouping by Extraction 178
Grouping by Rule Definitions 180
Grouping by Tracking Code 181
Other Applications for Filters 183
Filtered Views vs. Segments 184
Summary 185
Chapter 9: Measuring Campaigns and Troubleshooting Traffic Sources 186
Traffic Sources in GA 186
Adding Organic Search Engines 187
Ignoring Certain Referrers 188
Campaign Tracking 188
Campaign Tracking URLs 189
Shortening Campaign URLs 191
Avoiding Conflicts with Campaign URLs 191
Specifying Campaign Values with GTM 192
Channel Groupings in GA 193
Traffic Data Integrations 195
AdWords 195
DoubleClick Platforms 197
Google Search Console 198
Troubleshooting Traffic Sources 198
Redirects 198
Self-Referrals 200
Untagged Pages 201
Incorrect Cross-Domain or Subdomain Tracking 201
Summary 201
Chapter 10: Tracking Users Across Devices 202
Set Up User ID in GA 204
Send User ID Data with GTM 206
Provide a User ID Value 206
Set Up GTM to Send User ID to GA 206
Summary 207
Chapter 11: Providing Additional Data About Users 208
Custom Dimensions and Metrics 208
Dimensions 209
Metrics 210
Accessing Custom Dimensions and Metrics in GA 212
Setting Up Custom Dimensions and Metrics 213
Creating a Custom Dimension or Metric in GA 214
Generating Custom Data 215
Using the Data Layer 216
Sending Custom Information to GA 216
Additional Examples 218
Custom Dimensions from Form Input 218
Custom Metrics from Interactions 219
Summary 220
Part III: Collecting Data from Other Sources 221
Chapter 12: Importing Data into Google Analytics 222
Data Import Process 223
Creating a Data Set 223
Data Import Schema 225
Uploading Data 226
Updating Data Sets 226
Data Import Types 227
Hit Data Import 227
Refund Data 227
Extended Data Import 227
User Data Import 228
Campaign Data Import 228
Geographical Data Import 228
Content Data Import 229
Product Data Import 229
Custom Data Import 229
Summary Data Import 230
Cost Data Import 230
Summary 230
Chapter 13: Collecting Data from Mobile Apps 231
GA for Mobile Apps 232
App Properties and Views 232
Mobile App SDKs 234
Android and iOS 234
Unity 235
GTM Containers for Mobile Apps 235
Differences from Website Containers 235
Tags 235
Triggers 236
Variables 236
The Data Layer in Mobile Apps 238
Deployment and Testing 239
Summary 240
Chapter 14: Sending Data from Other Sources Using GA’s Measurement Protocol 241
Sending Data 242
HTTP Request 242
Payload Parameters 242
Client ID and User ID 243
Request Data Outside the Payload 244
Cache Busting 244
Validation 245
Data Processing in GA 246
Summary 246
Chapter 15: Using Google Analytics with BigQuery for Big Data Analysis 247
About BigQuery 248
What BigQuery Is Not 248
GA and BigQuery Integration 248
Accessing BigQuery 249
Web Interface 249
GA Data Schema in BigQuery 251
BigQuery’s Query Language 252
Selecting Data from Tables 253
Computation Functions 254
Table Date Ranges 256
Flattening Tables with Repeated Fields 257
Ordering by Fields 258
Grouping Fields 259
Finding Data Where a Condition Is Met 259
Further Google Analytics Examples 260
Bounce Rate by Landing Page 260
Segmenting by a Custom Dimension 260
Metrics for Custom Dimension Values 261
Pivoting Dimensions 262
Joining Data 263
Strategies for Using GA and BigQuery in Big Data Analysis 264
Importing Data into BigQuery 264
Extracting Data for Use in Other Applications 265
Summary 265
Appendix A: Google Tag Manager and Google Analytics APIs 266
Google API Basics 266
Google Tag Manager API 267
GTM Container JSON Format 267
Google Analytics APIs 268
Reporting APIs 268
Core Reporting API 268
Specifying a View 268
Dimensions & Metrics
Sort, Filter, and Segment 269
Date Ranges, Results, and Pagination 269
Query Explorer Tool 269
Multi-Channel Funnels Reporting API 270
Real-Time Reporting API 270
Embed API 271
Metadata API 271
Configuration APIs 271
Management API 271
Provisioning API 272
Index 273

Erscheint lt. Verlag 5.11.2015
Zusatzinfo XXII, 269 p. 124 illus.
Verlagsort Berkeley
Sprache englisch
Themenwelt Informatik Datenbanken Data Warehouse / Data Mining
Informatik Software Entwicklung SOA / Web Services
Mathematik / Informatik Informatik Web / Internet
Schlagworte Google Analytics • Google Analytics and Google Tag Manager APIs • Google BigQuery to analyze Big Data questions • Google for developers • Google Tag Manager • Google Tag Manager and jQuery • Web Analytics • Web analytics data
ISBN-10 1-4842-0265-1 / 1484202651
ISBN-13 978-1-4842-0265-4 / 9781484202654
Haben Sie eine Frage zum Produkt?
PDFPDF (Wasserzeichen)
Größe: 5,3 MB

DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasser­zeichen und ist damit für Sie persona­lisiert. Bei einer missbräuch­lichen Weiter­gabe des eBooks an Dritte ist eine Rück­ver­folgung an die Quelle möglich.

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.

Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Datenschutz und Sicherheit in Daten- und KI-Projekten

von Katharine Jarmul

eBook Download (2024)
O'Reilly Verlag
49,90