8249 West 95th Street, Overland Park, KS 66212

Multi-Site Unified Tracking Using Google Tag Manager

One of our new PPC clients has a pretty sizeable account with thousands of keywords and hundreds of ads. They also advertise in print using vanity URLs which complicates things a little because PPC is used to cover those URLs as well. They have a bunch of landing pages on about 10 different URLs. When we took on this client we began to inventory how users were tracked because we weren’t getting good data. Their Google Analytics account has the maximum number of properties in it, so there is a lot to take in. One problem we faced was standardization of tracking code implementation. The webmaster wasn’t a fan of hardcoding things, and wasn’t a fan of updating something without a “real” reason to do so. Since I was going to have to fight the fight, I figured I’d work to get Google Tag Manager implemented so we could do everything we ever wanted with a single implementation.

We started the implementation with the topic I’ll discuss here; standardization of Google Analytics Trackers. It occurred to me that Tag Manager could listen to the hostname phoning home with info so I could instruct Tag Manager to do something specific when a certain hostname phoned home. Since they use a standard lead form across a bunch of hostnames, we could setup variables, triggers, and tags for the standard form and then listen to it across several sites with one Tag Manager setup.

I started the process by creating a Lookup Table variable and selected “page hostname” for the input variable. Based on the input, I would select a certain output. The screenshot below shows the Lookup Table. The “Input” column contains all the different hostnames that could phone home with this single Tag Manager code, and the “Output” column has which Analytics account number to use for each hostname.

The next step was creating the standardized Google Analytics tracker. No problem there. When setting up the variable, instead of including the Google Analytics account number as one normally would, I used the name of the control table as you see in the screenshot below.

Once that was done, I configured a tag to insert the Google Analytics tracker and instructed it to use the Standardized GA Tracker that that I’d created to choose which Google Analytics tracker to use. Viola! Multi-domain, Hostname-driven, standardized Google Analytics tracking using Google Tag Manager!