Your Questions Answered: Tracking Sources Across Domains

August 27, 2010 | Jonathan Weber

A recent question in the blog questions box (at the right, and please suggest questions if you have them):

My funnel goes something like this:

  1. A visitor clicks on an AdWords ad and lands on SiteA with the ?gclid tracking parameter
  2. The visitor clicks through to SiteB (which I control as well) and makes purchase

On SiteA, I’ve set up links so that the full query string is passed from page to page as the visitor clicks around. If the visitor lands on SiteA.com/landingpage.php?gclid=123456, each page they visit will have that query string ?gclid=12345. When they click through to SiteB, I can see that they came to SiteA (referrer) from Google (w/ ?gclid=). Does having the ?gclid parameter on all URLs on SiteA do anything to reports in either Adwords or Analytics for SiteA?

There are really 2 issues here: First, what does the gclid parameter do? Second, when we have a visit that starts on one site and converts on another, what’s the best way to see how someone arrived (on SiteA) and whether they converted (on SiteB)?

AdWords tracking

The gclid parameter, all by itself, just gives you a numeric identifier that you can’t do much with. However, it enables Google to do all kinds of magic behind the scenes by letting you access a whole suite of AdWords reports.

So if you’re just seeing the gclid parameter in your URLs in Google Analytics, you’re missing out on a whole ton of data about AdWords. How do you fix it? See this post on troubleshooting the link between your AdWords and Analytics accounts (an oldie but a goodie). Get that set up right, and suddenly you have all kinds of information about individual campaigns, keywords, placements, and ads — including things you can’t get in AdWords, like Bounce Rates and even an ROI calculation (if you have goal values or ecommerce revenue data to calculate it from)!

Landings on one site, Conversions on another

Believe it or not, this is a common problem. Lots of sites have a separate web application for a shopping cart (or donation site, or member signup site, etc.). People land on your “main” site (SiteA) but you send them to the other site (SiteB) to actually fill out some forms and convert.

Sure, by default you can see SiteA as a referrer (in the Referring Sites report) for the data for SiteB. But this isn’t ideal, because what we really want to know is, how did this visitor arrive at SiteA, and did they convert on SiteB? Basically, we want to treat them as one big site, even though they are actually two separate domains.

Google Analytics lets you do this through a feature called cross-domain tracking. It involves making changes to your tracking code on both sites to track them together and follow a visit across both sites, passing the information about the visit from SiteA to SiteB when the visitor crosses over. For more information, you can look in the Help Center, in the developer documentation on Google Code, or check out a book like Advanced Web Metrics with Google Analytics, which has a section in Chapter 7 about cross-domain tracking.