Consent Mode V2 for Google Tags

**Last updated March 7, 2024. Clarified that you do NOT need to resend hits when consent is granted, if those hits were collected on the same page when consent was denied. Google’s Consent Mode continues to be a hot topic, especially since in 2024 it will be required to implement Consent Mode in case a website or app is collecting data for audience building or remarketing with Google’s advertising services. Read More…

One Tag to Rule Them All: Introducing the New Google Tag

For the longest time, Google has been working towards consolidation of their products to build a unified tagging platform. Products that are instrumented (or associated) with “tags” would fall under this umbrella. These comprise tools like Google Tag Manager, Google Ads, Google Optimize, and, of course, Google Analytics. If you’ve been peeking under the hood, you might have noticed how all the tools listed above already run through the gtag.js library. Read More…

Debug Guide for Web Analytics and Tag Management

One of the key skills for anyone working with web analytics and tag management is understanding how to identify where things went wrong, why they went wrong, and ideally how to fix them. There are plenty of excellent browser extensions for helping you debug, and we’ll discuss these in the guide, too. But most of all we’re going to use browsers’ own developer tools, as they are always the best source of truth for anything that happens within the browser window. Read More…

Consent Mode for Google Tags

Note! This is about the original version of Consent Mode. While the content is still very valid and you should read through it to understand how it works, Google has since released a “V2” update with additional consent signals. You can read about Consent Mode V2 here. . Not too long ago, Google announced a new consent mode for Google tags. It allows you to build a mechanism where Google’s tags parse, react, and respond to the consent status of your site visitors. Read More…

The New CookieFlags Setting in Google Analytics

With the enforcement of SameSite settings in the latest versions of Google Chrome, it’s become a mad scramble to get cookies working across first-party and third-party contexts. I’ve covered this phenomenon before in my SameSite article, as well as in my guide for setting up cookieless tracking for iframes. Recently, Google Analytics updated its libraries (App+Web, gtag.js, and analytics.js) with a new setting: cookieFlags (analytics.js) or cookie_flags (App+Web and gtag.js). Read More…

Send Hits to the Past With Google Analytics

One of the hard-and-fast rules in Google Analytics is that once hits have been collected and processed into your data properties, those hits are untouchable. This means that if you mistakenly collect duplicate or incorrect transactions, PII traffic, or referral spam, for example, it’s extremely difficult, if not downright impossible, to purge or change this data in Google Analytics. Another staple of Google Analytics’ strict schema is that displacing hits in time is also very difficult. Read More…

Custom Parameter Reporting in Google Analytics: App + Web

In Google Analytics: App + Web, you collect events. One event differs from another event by the name it uses. An event with the name page_view is different from, say, an event with the name file_download. This is all run-of-the-mill stuff. You know this. However, the fundamental change that App + Web introduces, when compared to Universal Analytics, is how event parameters are collected and processed. This gets more complicated than it should be. Read More…

Calculate Readability Scores for Content

There are lots of different readability formulas out there, which seek to provide an index on how readable any given excerpt of text is. Typically, these formulas output a grade-level score, which indicates, roughly, the level of education required to read the text excerpt with ease. Any “quality index” that seeks to reduce the complexity of something as multi-faceted as reading should be subject to scrutiny. This is true for Bounce Rate, this is true for Time On Page, and this is true for a readability score. Read More…

Improve Google Analytics Bot Detection With ReCAPTCHA

There are thousands upon thousands of bots, crawlers, spiders, and other creepy-crawlies out there doing nothing but crawling through websites and harvesting the content within for whatever purposes they have been fine-tuned to. While Google Analytics provides a bot filtering feature to filter out “spam” and “bot traffic” from views, this is far from comprehensive enough to tackle all instances of bot traffic that might enter the site. You might have noticed bot traffic in your data even if you have bot filtering toggled on. Read More…

Enable BigQuery Export for Google Analytics: App + Web Properties

Update 7 October 2020: BigQuery Export can now be configured via the property settings of Google Analytics: App + Web, so you don’t need to follow the steps in this article. Check out Charles Farina’s guide for how to do this. Here’s yet another article inspired by the fairly recent release of Google Analytics: App + Web properties. This new property type surfaces Firebase’s analytics capabilities for websites as well, when before they were restricted to mobile apps only (see my guides for iOS and Android). Read More…