Learning Google Analytics Creating Business Impact and Driving Insights (Mark Edmondson) (Z-Library)

Author: Mark Edmondson

科学

Why is Google Analytics 4 the most modern data model available for digital marketing analytics? Rather than simply reporting what has happened, GA4's new cloud integrations enable more data activation, linking online and offline data across all your streams to provide end-to-end marketing data. This practical book prepares you for the future of digital marketing by demonstrating how GA4 supports these additional cloud integrations. Author Mark Edmondson, Google developer expert for Google Analytics and Google Cloud, provides a concise yet comprehensive overview of GA4 and its cloud integrations. Data, business, and marketing analysts will learn major facets of GA4's powerful new analytics model, with topics including data architecture and strategy, and data ingestion, storage, and modeling. You'll explore common data activation use cases and get the guidance you need to implement them. You'll learn: • How Google Cloud integrates with GA4 • The potential use cases that GA4 integrations can enable • Skills and resources needed to create GA4 integrations • How much GA4 data capture is necessary to enable use cases • The process of designing dataflows from strategy through data storage, modeling, and activation • How to adapt the use cases to fit your business needs

📄 File Format: PDF
💾 File Size: 22.3 MB
11
Views
0
Downloads
0.00
Total Donations

📄 Text Preview (First 20 pages)

ℹ️

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

📄 Page 1
Ed m ond son Learning Google Analytics Creating Business Impact and Driving Insights Mark Edmondson
📄 Page 2
DATA SCIENCE ”Learning Google Analytics helps you to use every tool in the toolbox to not only understand your data, but to create the competitive advantage of activating your data to drive value and growth.” —Melinda Schiera Analytics Strategist Learning Google Analytics US $59.99 CAN $74.99 ISBN: 978-1-098-11308-7 Twitter: @oreillymedia linkedin.com/company/oreilly-media youtube.com/oreillymedia Why is Google Analytics 4 the most modern data model available for digital marketing analytics? Rather than simply reporting what has happened, GA4’s new cloud integrations enable more data activation, linking online and offline data across all your streams to provide end-to-end marketing data. This practical book prepares you for the future of digital marketing by demonstrating how GA4 supports these additional cloud integrations. Author Mark Edmondson, Google developer expert for Google Analytics and Google Cloud, provides a concise yet comprehensive overview of GA4 and its cloud integrations. Data, business, and marketing analysts will learn major facets of GA4’s powerful new analytics model, with topics including data architecture and strategy, and data ingestion, storage, and modeling. You’ll explore common data activation use cases and get the guidance you need to implement them. You’ll learn: • How Google Cloud integrates with GA4 • The potential use cases that GA4 integrations can enable • Skills and resources needed to create GA4 integrations • How much GA4 data capture is necessary to enable use cases • The process of designing dataflows from strategy through data storage, modeling, and activation • How to adapt the use cases to fit your business needs Mark Edmondson, developer expert for Google Analytics and Google Cloud, has helped global brands with their digital marketing strategy for more than 15 years. He contributes to the digital marketing community through his blog and open source contributions, focusing on data science and engineering applications with digital marketing data. Mark works daily with programming languages such as R, Python, JavaScript, and SQL to turn analytics data into wisdom. Ed m ond son
📄 Page 3
Mark Edmondson Learning Google Analytics Creating Business Impact and Driving Insights Boston Farnham Sebastopol TokyoBeijing
📄 Page 4
978-1-098-11308-7 [LSI] Learning Google Analytics by Mark Edmondson Copyright © 2023 Mark Edmondson. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com. Acquisitions Editor: Andy Kwan Development Editor: Melissa Potter Production Editor: Kate Galloway Copyeditor: Stephanie English Proofreader: Piper Editorial Consulting, LLC Indexer: Sue Klefstad Interior Designer: David Futato Cover Designer: Karen Montgomery Illustrator: Kate Dullea November 2022: First Edition Revision History for the First Edition 2022-11-10: First Release See http://oreilly.com/catalog/errata.csp?isbn=9781098113087 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Learning Google Analytics, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. The views expressed in this work are those of the author and do not represent the publisher’s views. While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.
📄 Page 5
Table of Contents Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix 1. The New Google Analytics 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Introducing GA4 1 The Unification of Mobile and Web Analytics 2 Firebase and BigQuery—First Steps into the Cloud 3 GA4 Deployment 3 Universal Analytics Versus GA4 4 The GA4 Data Model 6 Events 7 Custom Parameters 8 Ecommerce Items 9 User Properties 10 Google Cloud Platform 11 Relevant GCP Services 11 Coding Skills 12 Onboarding to GCP 14 Moving Up the Serverless Pyramid 15 Wrapping Up Our GCP Intro 18 Introduction to Our Use Cases 18 Use Case: Predictive Purchases 19 Use Case: Audience Segmentation 20 Use Case: Real-Time Forecasting 22 Summary 24 2. Data Architecture and Strategy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Creating an Environment for Success 25 Stakeholder Buy-In 25 iii
📄 Page 6
A Use Case–Led Approach to Avoiding Spaceships 26 Demonstrating Business Value 27 Assessing Digital Maturity 28 Prioritizing Your Use Cases 28 Technical Requirements 28 Data Ingestion 30 Data Storage 31 Data Modeling 34 Model Performance Versus Business Value 35 Principle of Least Movement (of Data) 36 Raw Data Inputs to Informational Outputs 36 Helping Your Data Scientists/Modelers 36 Setting Model KPIs 37 Final Location of Modeling 37 Data Activation 38 Maybe It’s Not a Dashboard 38 Interaction with Your End Users 39 User Privacy 40 Respecting User Privacy Choices 42 Privacy by Design 42 Helpful Tools 43 gcloud 43 Version Control/Git 43 Integrated Developer Environments 44 Containers (Including Docker) 44 Summary 45 3. Data Ingestion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Breaking Down Data Silos 47 Less Is More 48 Specifying Data Schema 48 GA4 Configuration 49 GA4 Event Types 49 GTM Capturing GA4 Events 53 Custom Field Configuration 57 Modifying or Creating GA4 Events 59 User Properties 61 Measurement Protocol v2 69 Exporting GA4 Data via APIs 71 Authentication with Data API 73 Running Data API Queries 74 BigQuery 76 iv | Table of Contents
📄 Page 7
Linking GA4 with BigQuery 76 BigQuery SQL on Your GA4 Exports 78 BigQuery for Other Data Sources 79 Public BigQuery Datasets 80 GTM Server Side 80 Google Cloud Storage 82 Event-Driven Storage 83 Data Privacy 94 CRM Database Imports via GCS 94 Setting Up Cloud Build CI/CD with GitHub 95 Setting Up GitHub 95 Setting Up the GitHub Connection to Cloud Build 95 Adding Files to the Repository 98 Summary 100 4. Data Storage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Data Principles 102 Tidy Data 102 Datasets for Different Roles 107 BigQuery 109 When to Use BigQuery 110 Dataset Organization 111 Table Tips 112 Pub/Sub 114 Setting Up a Pub/Sub Topic for GA4 BigQuery Exports 114 Creating Partitioned BigQuery Tables from Your GA4 Export 116 Server-side Push to Pub/Sub 118 Firestore 120 When to Use Firestore 120 Accessing Firestore Data Via an API 121 GCS 122 Scheduling Data Imports 127 Data Import Types: Streaming Versus Scheduled Batches 127 BigQuery Views 128 BigQuery Scheduled Queries 129 Cloud Composer 131 Cloud Scheduler 136 Cloud Build 137 Streaming Data Flows 145 Pub/Sub for Streaming Data 145 Apache Beam/DataFlow 146 Streaming Via Cloud Functions 152 Table of Contents | v
📄 Page 8
Protecting User Privacy 156 Data Privacy by Design 156 Data Expiration in BigQuery 158 Data Loss Prevention API 159 Summary 159 5. Data Modeling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 GA4 Data Modeling 161 Standard Reports and Explorations 162 Attribution Modeling 162 User and Session Resolution 164 Consent Mode Modeling 165 Audience Creation 166 Predictive Metrics 167 Insights 167 Turning Data into Insight 168 Scoping Data Outcomes 169 Accuracy Versus Incremental Benefit 172 Choosing Your Method of Approach 173 Keeping Your Modeling Pipelines Up-To-Date 174 Linking Datasets 175 BigQuery ML 177 Comparison of BigQuery ML Models 177 Putting a Model into Production 180 Machine Learning APIs 181 Putting an ML API into Production 182 Google Cloud AI: Vertex AI 183 Putting a Vertex API into Production 185 Integration with R 185 Overview of Capabilities 186 Docker 188 R in Production 190 Summary 191 6. Data Activation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Importance of Data Activation 194 GA4 Audiences and Google Marketing Platform 195 Google Optimize 201 Visualization 203 Making Dashboards Work 203 GA4 Dashboarding Options 204 Data Studio 217 vi | Table of Contents
📄 Page 9
Looker 221 Other Third-Party Visualization Tools 222 Aggregate Tables Bring Data-Driven Decisions 223 Caching and Cost Management 224 Creating Marketing APIs 225 Creating Microservices 225 Event Triggers 227 Firestore Integrations 230 Summary 234 7. Use Case: Predictive Purchases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 Creating the Business Case 236 Assessing Value 236 Estimating Resources 237 Data Architecture 237 Data Ingestion: GA4 Configuration 238 Data Storage and Privacy Design 239 Data Modeling—Exporting Audiences to Google Ads 240 Data Activation: Testing Performance 242 Summary 244 8. Use Case: Audience Segmentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 Creating the Business Case 245 Assessing Value 246 Estimating Resources 247 Data Architecture 249 Data Ingestion 250 GA4 Data Capture Configuration 250 GA4 BigQuery Exports 252 Data Storage: Transformations of Your Datasets 254 Data Modeling 256 Data Activation 258 Setting Up GA4 Imports Via GTM SS 260 Exporting Audiences from GA4 263 Testing Performance 265 Summary 266 9. Use Case: Real-Time Forecasting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Creating the Business Case 268 Resources Needed 268 Data Architecture 269 Data Ingestion 270 Table of Contents | vii
📄 Page 10
GA4 Configuration 270 Data Storage 273 Hosting the Shiny App on Cloud Run 273 Data Modeling 276 Data Activation—A Real-Time Dashboard 279 R Code for the Real-Time Shiny App 280 GA4 Authentication with a Service Account 282 Putting It All Together in a Shiny App 286 Summary 292 10. Next Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 Motivation: How I Learned What Is in This Book 296 Learning Resources 298 Asking for Help 300 Certifications 301 Final Thoughts 302 Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 viii | Table of Contents
📄 Page 11
Preface GA4 is the biggest evolution yet of the most popular digital marketing tool used on the web, Google Analytics. BuiltWith.com estimates that around 72% of the top 10,000 websites use Google Analytics, and all those websites will be looking at upgrading from the legacy Universal Analytics to GA4 in the next couple of years. Due to GA4’s new data model, the latest iteration of Google Analytics will not be compatible with its predecessors, unlike past upgrades such as from Urchin to Uni‐ versal Analytics. The older systems will eventually be sunsetted, so it’s realistic to say that in a few years’ time GA4 could become the most popular analytics solution on the planet. GA4 offers a new digital marketing paradigm: moving analytics tools beyond report‐ ing what has happened toward influencing what will happen via data activation. Data activation is about making a positive effect on your website so you can see real busi‐ ness impact with your analytics. The trend for digital marketing over the last few years has been toward making faster decisions to help justify the cost of your website, app, or social media activity. As ecommerce booms, digital analytics have become more critical to ensure budgets are allocated correctly in a highly competitive arena. Since GA4’s predecessors, Urchin and Universal Analytics, were launched in 2005, the internet has changed to incorporate mobile apps, IoT, machine learning, privacy initiatives, and new business models—all of which require an evolution in how data is processed. GA4 incorporates features to support these new data streams and prepares you for the future of digital marketing. Alongside its many native integrations such as Google Ads, Google Optimize, and Campaign Manager in the Google Marketing Suite, GA4’s expanded usage of the Google Cloud Platform and Firebase means digital marketers now have the capabili‐ ties to build almost any data flow imaginable and scale it to a billion users. Learning to coordinate these parts enables digital marketers to more easily use their analysis to create data applications based on the same data sources, achieving quicker and more visible results for their own website. ix
📄 Page 12
These new opportunities require learning skills that may be unfamiliar to traditional digital marketers, so this book aims to help bring you up to speed and help your GA4 implementation fulfill its potential. We will demonstrate common use cases for GA4 data activation and provide step-by-step instructions on how to implement them, as well as introduce ideas and concepts to help you build your own bespoke applications. I hope to give inspiration for those wishing to create their own data activation projects. Code examples will be included to help provide some templates, as well as introductions to various cloud components such as data storage, data modeling, APIs, and serverless functions to help you assess what technologies you may want to enable. By the end of this book, you will be able to understand the following: • What use cases GA4 integrations can enable • What skills and resources are needed • What capabilities third-party technology needs to fulfill • How the Google Cloud integrates with GA4 • What data capture is necessary by GA4 to enable use cases • The process of designing data flows from strategy to data storage, modeling, and activation • How to respect user privacy choices and why it’s important to do so I think this is the most exciting era for working in digital analytics, simply because the potential of what you can do now is almost limitless. The cloud has made possible what was impossible for individuals or smaller companies to do even 10 years ago, and that revolution means I truly feel you’re limited only by how much ambition you have. If this book can help inspire even one person to realize that ambition, it will have been a worthwhile venture. Who This Book Is For If you’re reading this book, you’re likely a digital marketer with some digital analytics background. Perhaps you’re working in an agency or within a digital marketing department, such as for an ecommerce brand or a web publisher. You may be looking to justify upgrading to GA4 from Universal Analytics or have already made the switch and are now looking to make use of its advanced features. This book aims to both inspire nontechnical readers with what is possible and give enough practical information that technically minded readers can implement the use cases within the book and use the building blocks to create their own bespoke integrations. x | Preface
📄 Page 13
The book aims to educate you on the features of GA4’s integrations beyond the basics that you’ve picked up with your one to two years’ experience in digital marketing. You’re probably comfortable with implementing tags on the website and/or reading basic GA reports. More technical users may be using Google APIs and have some JavaScript/Python/R/SQL knowledge as well as some cloud experience. This book is not an exhaustive roundup of GA4 features. Instead, this book focuses on what you can do today to extract business value out of your GA4 implementation, using the Google Cloud Platform to facilitate it. Conventions Used in This Book The following typographical conventions are used in this book: Italic Indicates new terms, URLs, email addresses, filenames, and file extensions. Constant width Used for program listings, as well as within paragraphs to refer to program ele‐ ments such as variable or function names, databases, data types, environment variables, statements, and keywords. Constant width italic Shows text that should be replaced with user-supplied values or by values deter‐ mined by context. This element signifies a tip or suggestion. This element signifies a general note. This element indicates a warning or caution. Preface | xi
📄 Page 14
Using Code Examples Supplemental material (code examples, exercises, etc.) is available for download at https://github.com/MarkEdmondson1234/code-examples. If you have a technical question or a problem using the code examples, please send email to bookquestions@oreilly.com. This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission. We appreciate, but generally do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Learning Google Analyt‐ ics by Mark Edmondson (O’Reilly). Copyright 2023 Mark Edmondson, 978-1-098-11308-7.” If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at permissions@oreilly.com. O’Reilly Online Learning For more than 40 years, O’Reilly Media has provided technol‐ ogy and business training, knowledge, and insight to help companies succeed. Our unique network of experts and innovators share their knowledge and expertise through books, articles, and our online learning platform. O’Reilly’s online learning platform gives you on-demand access to live training courses, in-depth learning paths, interactive coding environments, and a vast collection of text and video from O’Reilly and 200+ other publishers. For more information, visit http://oreilly.com. xii | Preface
📄 Page 15
How to Contact Us Please address comments and questions concerning this book to the publisher: O’Reilly Media, Inc. 1005 Gravenstein Highway North Sebastopol, CA 95472 800-998-9938 (in the United States or Canada) 707-829-0515 (international or local) 707-829-0104 (fax) We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at https://oreil.ly/learning-google-analytics. Email bookquestions@oreilly.com to comment or ask technical questions about this book. For news and information about our books and courses, visit https://oreilly.com. Find us on LinkedIn: https://linkedin.com/company/oreilly-media. Follow us on Twitter: https://twitter.com/oreillymedia. Watch us on YouTube: https://youtube.com/oreillymedia. Acknowledgments I’d like to thank Sanne for her encouragement and faith in me, and Rose for my most amazing daughter. IIH Nordic has been instrumental in helping me write this book—many thanks to Steen, Henrik, and Robert for their support. The #measure community has provided me with all of the inspiration; their ideas gave me something to write about. In particular, I’d like to thank Simo for his kind‐ ness over the years. Thank you also to the technical reviewers who provided valuable feedback: Darshan Patole, Denis Golubovskyi, Melinda Schiera, and Justin Beasley. Preface | xiii
📄 Page 16
(This page has no text content)
📄 Page 17
CHAPTER 1 The New Google Analytics 4 This chapter introduces the new Google Analytics 4 (GA4) and explores why it was developed. We’ll see where Google felt its predecessor, Universal Analytics, was lack‐ ing and how GA4 means to strengthen those areas with the foundation of a new data model. We’ll also look at how the Google Cloud Platform (GCP) integration with GA4 enhances its functionality and get a first look at the use cases that will help illustrate the new capabilities of GA4 and get you started with your own data projects. Introducing GA4 Google Analytics 4 was released out of beta and introduced as the new Google Ana‐ lytics in early 2021. Its beta name “App+Web” was replaced with Google Analytics 4. The key differences between GA4 and Universal Analytics highlighted in GA4’s announcement post were its machine learning capabilities, unified data schema across web and mobile, and privacy-centric design. Google had been planning the release of GA4 for many years before its public announcement. After its release, Google Analytics became the most popular web ana‐ lytics system, yet in 2021 its design still reflected the design goals of the previous 15 years. Although the platform has been enhanced over the years by the dedicated Goo‐ gle Analytics team, there were some modern challenges that were more difficult to solve: users were asking for single customer views for web and mobile apps rather than needing to send data to two separate properties, Google Cloud was a leader in machine learning technologies yet machine learning was not simple to integrate with the GA data model, and user privacy was a growing concern that required tighter control on where analytics data flowed. 1
📄 Page 18
When it was first launched in 2005, Google Analytics disrupted the analytics industry by offering a full-featured free version of what had previously been available only in paid enterprise products. Recognizing that the more webmasters knew about their traffic, the more likely they were to invest in AdWords (now Google Ads), Google Analytics was a win-win investment that gave everyone access to the voice of their users as they browsed their website. By 2020, the analytics landscape was much different. Competitor analytics products were launched with simpler data models that could work across data sources and were more suited to machine learning and privacy (an essential user feature). You could use the cloud to make an analytics system more open, giving more control to analytics professionals. Competing analytics solutions could even be run on Google’s own cloud infrastructure, which changed the economics of build or buy. The ideal analytics solutions would have sensible defaults for those looking for quick start-up but would be more customizable and scalable to satisfy the more adventurous cus‐ tomer’s needs. The Unification of Mobile and Web Analytics While its previous name of “App+Web” was replaced with GA4 at launch, the dis‐ carded name was more representative of why GA4 was different. Up until it was sunset in late 2019, Google Analytics for mobile apps (Android/iOS) had its own separate analytics system distinct from web analytics. These software development kits (SDKs) used a different data model that was more suited to app analytics, where concepts like page views, sessions, and users all meant slightly differ‐ ent things, which meant they couldn’t be easily compared to the web figures. Users who visited both app and web were usually not linked. GA4’s data model follows a customizable, event-only structure that was being adop‐ ted by mobile apps. Universal Analytics placed limitations on when data could be combined, known as data scoping, which meant that marketers needed to think about how their data fit within scopes such as user, session, or events. These were predeter‐ mined by Google, so you were forced to adopt its data model. With GA4’s event-only approach, you have more flexibility to determine how you want your data to look. When the old Google Analytics for mobile SDKs sunset in 2019, Google encouraged users to instead move over to the Firebase SDKs. Firebase had been developed as a complete mobile developer experience for iOS and Android with an integrated mobile SDK for creating mobile apps from the ground up, now including web analyt‐ ics. The new GA4 represented an additional data stream on top: the new web stream. Having iOS, Android, and web streams all using the same system means we now have a truly connected way to measure digital analytics across all those sources. 2 | Chapter 1: The New Google Analytics 4
📄 Page 19
Firebase and BigQuery—First Steps into the Cloud For many marketers, GA4 is their first introduction to the new cloud products that are integral to the operation of GA4: Firebase and BigQuery. Firebase and BigQuery are both products within the GCP, a broad service Google offers for all manner of cloud services. This book focuses on those products that are part of its data analytics cloud offerings, but be aware that these are just a subset of the whole cloud platform. Firebase is a broad mobile development framework that now includes Google Analyt‐ ics. Mobile developers also use it to give serverless power to the mobile apps with use‐ ful features such as remote config to change the code of deployed apps without republishing to the app store, machine learning APIs such as predictive modeling, authentication, mobile alerting, and Google advertisement integrations. Firebase is a subset of GCP services that are in some cases a rebrand of the underlying GCP prod‐ uct—for example, Firebase Cloud Functions are the same as GCP Cloud Functions. BigQuery can be considered one of the gems of GCP; it’s recognized as one of its most compelling products compared with the equivalent running on other cloud pro‐ viders. BigQuery is an SQL database tailor-made for analytics workloads, and it was one of the first serverless databases available. It includes innovations such as a pricing model that stores data cheaply while charging on demand for queries and a lightning- fast query engine running on Dremel that offers in some cases 100x speed-ups com‐ pared with MySQL. GA360 users may already be familiar with it as one of its features was to export raw, unsampled data to BigQuery—but only if you bought a GA360 license (this was my introduction to the cloud!). GA4 BigQuery exports will be avail‐ able to all, which is exciting because BigQuery itself is a gateway to the rest of GCP. BigQuery features heavily in this book. GA4 Deployment This book is not an exhaustive guide on GA4 implementation; a better place for that would be the resources outlined in Chapter 10. However, the book does cover com‐ mon configurations that will give the whole picture, from data collection to business value. There are essentially three ways to configure capturing data from websites: gtag.js, analytics.js, or Google Tag Manager (GTM). In almost all cases, I would recom‐ mend implementing them through GTM, which you can read more about in Chap‐ ter 3. The reasons for that are flexibility and the ability to decouple the dataLayer work from the analytics configuration, which will minimize the amount of develop‐ ment work needed within the website HTML. Developer resources will be most effec‐ tive implementing a tidy dataLayer for your GTM since this will cover all your tracking needs, not just GA4 or Google tags. Any additional changes to your tracking Introducing GA4 | 3
📄 Page 20
configuration can then be done within GTM’s web interface without needing to involve precious development time again for each minor edit. With the introduction of GTM Server Side (SS), the configurations possible can also include direct integrations with Google Cloud and backend systems along with modi‐ fications of the HTTP call’s requests and responses, giving you the ultimate flexibility. Universal Analytics Versus GA4 GA4 is said to be an evolution of its predecessor, Universal Analytics (nicknamed GA3 since GA4’s release), but how is it actually different? One of the first questions people have when hearing about GA4 is “How is this differ‐ ent enough for me to want to change? Why should I go through the bother of retool‐ ing, retraining, and relearning a system that has worked fine for the last 15 years?” This is a key question, and this section examines why. A dedicated Google help topic also covers this question. A new data model The first big change is in the data model itself, covered later in “The GA4 Data Model” on page 6. Universal Analytics was very much focused on website metrics where concepts such as users, sessions, and page views were more easily defined; however, these concepts were more tricky to define for other data sources such as mobile apps and server hits. It often meant that workarounds had to be incorporated or some metrics ignored in the reports when the data came from certain sources. It also meant that some metrics didn’t work well together or were impossible to query. GA4 moves away from an imposed data schema to something that is much freer: now everything is an event. This flexibility lets you define your own metrics more easily, but for users who don’t want to get to that level of detail, they also provide default auto event types to give you some of the familiar metrics. This also means that it’s now possible to automatically collect some data that had to be configured separately before, such as link clicks, so the GA4 implementations should take less experience to implement correctly, helping to lower the barrier of entry for new digital analytics users. Specialist knowledge such as the difference between a session metric and a hit metric will be less critical. A more flexible approach to metrics GA4 events can be modified after they have been sent. This lets you correct tracking errors or standardize events (“sale” versus “transaction”) without needing to modify the tracking scripts—much easier to action. 4 | Chapter 1: The New Google Analytics 4
The above is a preview of the first 20 pages. Register to read the complete e-book.

💝 Support Author

0.00
Total Amount (¥)
0
Donation Count

Login to support the author

Login Now
Back to List