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 DOM Scraping Together a Datalayer for Google Analytics Ecommerce Tracking

Track Popular Blog Tags and Categories in Google Analytics

If you have a blog or work with content, you will likely want to know which type of posts are viewed most frequently by your readers. Google Analytics provides a lot of options for tracking content: it will show you what specific posts were the most viewed in the Top Pages report, allows you to … Read more Track Popular Blog Tags and Categories in Google Analytics

Send Google Analytics Client ID with Contact Form 7

This guide describes how to integrate the Google Analytics Client ID with the Contact Form 7 plugin for WordPress. No additional plugins are needed, though you will need to have Google Tag Manager available on the form page. While this post focuses on Contact Form 7 and the GA client ID, more generally this is a … Read more Send Google Analytics Client ID with Contact Form 7

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 Quickstart Guide to Google Analytics Clickstream Data

DOM Scraping into Data Layer & Custom JS Variables

While Google Tag Manager is best used in conjunction with a data layer, there are many cases where it will make sense to more rapidly deploy tags by scraping the DOM instead. Generally this is because DOM scraping means using the elements that already exist on the page — the page titles, classes, IDs, URLs, … Read more DOM Scraping into Data Layer & Custom JS Variables

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 Get Visitor IP Address with Google Tag Manager

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 Track Number of Search Results in Google Analytics with GTM

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 YouTube Video Tracking with Google Tag Manager

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 – Pass-Through Data Layer

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 GA Event Tracking in GTM – Custom HTML and JS