Leverage Enhanced Ecommerce Data Layer for Marketing Pixels

This post contains scripts that you can use as Custom JS Variables in Google Tag Manager. These scripts all target the quite specific (yet common) use case where a site already running Google Analytics Enhanced Ecommerce now needs to run additional marketing or analytics tags. Related post: Collect Enhanced Ecommerce Values into GTM Variables CONTENTS ... Read more

Set up Custom Dimensions using GA, GTM, and the Data Layer

This article was written for Universal Analytics, which will stop processing data in July 2023 as Google switches to GA4. As GA4 requires almost completely new configuration, check out Google's migration guide here, or, for a complete done-for-you solution, I recommend Mediauthentic. . Adding a custom dimension to Google Analytics involves several interconnected parts: the ... Read more

Useful Custom JavaScript Variables for Google Tag Manager

This post shows some useful Custom JavaScript Variables for Google Tag Manager. #2 and #3 require modification for your own site, while the others can be plugged in directly. Add Custom JavaScript Variables by navigating to Variables > New > Custom JavaScript. CONTENTS #1 Value of the Closest Parent ID#2 Text of the Closest Specific ... Read more

GTM dataLayer.push Examples (Standard, Ecommerce, Advanced)

This post shows four examples of using the dataLayer.push method to pass in extra metadata to Google Tag Manager (GTM) via Variables. #1 Standard GTM Data Layer Push Syntax#2 GTM Data Layer Push with Array#3 GTM Data Layer Push with Nested Key-Value Pairs#4 GTM Data Layer Push with Nested Arrays #1 STANDARD GTM DATA LAYER PUSH ... Read more

Collect Enhanced Ecommerce Values into GTM Variables

Setting up Enhanced Ecommerce tracking via Google Tag Manager & Google Analytics generally involves creating a data layer that contains all the relevant values, as described here: https://developers.google.com/tag-manager/enhanced-ecommerce#purchases These same values are often required to set up other marketing and analytics tags. For example, the Facebook conversion pixel looks like this: <script> fbq('track', 'Purchase', {currency: "USD", ... Read more

Quickstart Guide to Google Analytics Clickstream Data

This post provides downloadable Google Tag Manager (GTM) scripts and a walkthrough of the necessary steps for getting clickstream data out of Google Analytics. This clickstream data already exists behind the scenes; every time a user takes a tracked action on your website, like viewing a page or clicking a button, the data about that ... Read more

[Solution] An error occured while the tag was fired: net :: ERR_ABORTED

Google's Tag Assistant plugin is a great tool for troubleshooting various Google tags like Google Analytics, Google AdWords, and Google Tag Manager; just install and navigate to your site to enable checks for hundreds of issues. This post will describe how to fix a couple of the most common issues reported by the Tag Assistant ... Read more