DOM Scraping Together a Datalayer for Google Analytics Ecommerce Tracking

Google Analytics' e-commerce tracking is generally the most developer-intensive part of a Google Analytics implementation, because it requires a developer-built data layer on the transaction confirmation page. The data layer collects all the relevant data -- the transaction ID, the checkout total, the product names, the prices, and so on -- and lays them out ... 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

Get Visitor IP Address with Google Tag Manager

There are a few reasons you may want to access your visitors' IP addresses using Google Tag Manager (GTM): to block internal traffic, set rules for firing tags, pre-fill form fields, etc. Tracking IP address with Google Analytics is also possible through this method, but not advisable as it may violate Google's policies regarding personally identifiable ... Read more

Track Number of Search Results in Google Analytics with GTM

Tracking the number of onsite search results is useful for finding common searches for which few, or zero, results were returned, so that you can address gaps in your product or content offerings. This metric can also be used to analyze the correlation between search result counts and conversion rates. While the built-in onsite search ... Read more

YouTube Video Tracking with Google Tag Manager

In September 2017, Google released native YouTube video tracking in Google Tag Manager (GTM), which makes setting up Google Analytics event tracking for YouTube super easy. This blog post shows the steps to add YouTube video tracking to GTM, or you can skip to the end and download and import the pre-configured setup into your ... Read more

GA Event Tracking in GTM - Pass-Through Data Layer

This is the third post in a series on design patterns for tracking events in Google Analytics (GA) using Google Tag Manager (GTM). This third pattern is a developer-focused implementation pattern where your site developers push all the required information into a data layer. This method is sometimes referred to as a "pass through" method. ... Read more

GA Event Tracking in GTM - Custom HTML and JS

This is the second post in a series on design patterns for tracking events in Google Analytics (GA) using Google Tag Manager (GTM). This second pattern involves adding JavaScript through a Custom HTML tag. GTM is a very flexible tool, opening up many potential implementation design patterns for tagging. There is a spectrum, where some ... Read more