#GTMTips: Cross-Domain Tracking in Google Analytics 4

Setting up cross-domain tracking in Google Analytics 4 has been well-documented. The main departure from Universal Analytics is how cross-domain measurement is something you configure through the Google Analytics user interface rather than through implementation and JavaScript. While this approach is obviously beneficial especially for those who lack the know-how or the resources to configure the JavaScript trackers, it does lead to problems, too. In this article, I want to tackle these edge cases. Read More…

Track Core Web Vitals in GA4 With Google Tag Manager

Updated 3 March 2023: Added a checkbox to the template to enable collecting FCP, INP, and TTFB metrics, too.. Core Web Vitals is described on the dedicated web.dev resource as (emphasis mine): “Core Web Vitals are the subset of Web Vitals that apply to all pages, should be measured by all site owners, and will be surfaced across all Google tools.” The Core Web Vitals measurement as suggested by Google are: Read More…

#GTMTips: Write Client ID and Other GTAG Fields Into DataLayer

One of the big omissions, at least for now, in Google Analytics 4 is the customTask. It is unfortunate, but no such mechanism exists in the client-side SDKs. This means that you won’t be able to do all the magical things that customTask enables in Universal Analytics. One of the biggest headaches is how to collect extremely useful fields such as the Client ID, as these are not available by default in the Google Analytics 4 reporting interface. Read More…

Implementation Guide for Events in Google Analytics 4

On the surface, tracking events in Google Analytics 4 (GA4) is fairly simple. Events are, after all, pretty much the only thing you can collect in GA4. It’s easy to get tied down with endless comparisons to Universal Analytics, though. While I’m steadfastly opposed to the idea that GA4 should resemble Universal Analytics, it’s still important to cleanse the palate and approach GA4’s event tracking with an open mind. There are some comparisons that can be drawn between the new and the old, but what GA4 might lack in some features and use cases, it more than makes up for this with a more flexible data structure. Read More…

Google Analytics 4: Ecommerce Guide for Google Tag Manager

Last updated 17 March 2023: Item-scoped Custom Dimensions are now available in Google Analytics 4. This is an implementation guide for Google Analytics 4. The guide is aimed at Google Tag Manager users and has been designed to complement the official documentation. A thing to keep in mind is that Google Analytics 4 (GA4) is still very new. The Google Tag Manager integration is still in its infancy, and implementation places a lot of responsibility on accurate tagging and proper dataLayer instrumentation. Read More…