Scroll Tracking for Single-Page Applications (GTM)

Google Tag Manager (GTM) conveniently provides a scroll depth trigger to determine how far someone has scrolled down the page. However, this scroll depth trigger doesn’t work on websites using single page app (SPA) technology, since there is no full page load to reset the thresholds. This means that once you scroll down to the … Read more Scroll Tracking for Single-Page Applications (GTM)

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. CONTENTS BackgroundPrerequisite: Create a Data Layer Variable for the Products … Read more Leverage Enhanced Ecommerce Data Layer for Marketing Pixels

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

Adding a custom dimension to Google Analytics involves several interconnected parts: the data layer, tag manager setup, and admin settings in GA. This post walks through each step of the process to show how they fit together. CONTENTS Step 1: Push Values into the Data Layer Step 2: Set up Custom Dimensions in Google Analytics Admin … Read more Set up Custom Dimensions using GA, GTM, and the Data Layer

Track GA Onsite Search Without URL Query Strings

Google Analytics provides a super-easy method of tracking onsite search keywords: simply identify which query string (aka parameter) holds the onsite search term for your site, and enter that value at Admin > View > Site Search Settings. You can find your search query string by performing a search on your site and checking the … Read more Track GA Onsite Search Without URL Query Strings

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 Useful Custom JavaScript Variables for Google Tag Manager

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 … Read more GTM dataLayer.push Examples (Standard, Ecommerce, Advanced)

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 Collect Enhanced Ecommerce Values into GTM Variables

Content Marketing Analytics: Conversion Rate by Page

While Google Analytics provides many reports and metrics designed to evaluate the effectiveness of content marketing, there is no report showing the conversion rates of specific posts or pages on your site. For example, if you’re tracking registrations on your site, you may want to know which specific posts are associated with signups, even if … Read more Content Marketing Analytics: Conversion Rate by Page

Track IP Address in Google Analytics using GTM

In response to many questions about tracking IP addresses in Google Analytics, this is a follow-up post to Get Visitor IP Address with Google Tag Manager. Please follow the instructions in that post first to collect visitor IP address into a GTM Variable and create a GTM event. Once those steps are complete, you can follow … Read more Track IP Address in Google Analytics using GTM