Practitioner Post: Adwords Auto-Tagging and URL Redirects

Thursday, July 17, 2008 | 4:24 PM

Labels: , , ,

Recently, I watched all 5 seasons of Angel on DVD, and now I'm watching all 7 seasons of Buffy the Vampire Slayer. (I realize that I'm going backwards, but I just had to know Angel's back story.) If you've watched the shows, you know that the character Angel starts off as one thing and ends up as something completely different.

URL redirects are like Angel in this respect; they start off as one thing and end up as something else. In the process, Adwords auto-tagging (the "gclid") frequently gets "slain". Let's look at how we can address the resulting reporting problems.

First, a quick review of the back story.

Adwords auto-tagging makes it possible for you to see Adwords information in your Google Analytics reports without manually tagging each keyword. You simply enable auto-tagging in your Adwords account. The auto-tagging option is located on the My Account tab, on the Account Preferences page (click image to enlarge):


If you select this option, Adwords automatically appends a "gclid" parameter to your destination URLs:

www.example.com/?gclid=123xyz

If you already have query parameters in your URL, it will look something like this:

www.example.com/?param=a&gclid=123xyz

(Note that in the first example, "gclid" is preceded by a "?" and in the second example, it is preceded by a "&". Remember this distinction because it will be important later on.)

What if you're also using a third-party tracking system such as DoubleClick, or your destination URL redirects to a second or even third URL before Adwords users arrive on your site? Will the gclid be retained or get slain?

That depends on the tracking system or behavior of your redirects. This is a very important question to address before you enable auto-tagging.

Some redirects strip the gclid. While Google Analytics still records the visit and the subsequent user activity, it doesn't have the information necessary to properly attribute the visit to your Google ad. As a result, some of this traffic will be included in the "direct" category while other visits may show up as "not set". Furthermore, your Adwords Campaigns report in Google Analytics may show cost metrics, but your visits columns may show zeros (click image to enlarge):


Ugh! Can you prevent this from happening?

Absolutely! Performing a simple test before you enable auto-tagging will ensure that you receive valuable information on your Google campaign performance. Here are the steps for two URL scenarios:

Scenario 1
If your destination URL has no query parameters and looks something like this: www.i_will_redirect_you.com/:
  1. Paste this URL in your browser's address bar, but before you press Enter, append "?gclid=test" to the end, like this: www.i_will_redirect_you.com/?gclid=test.

  2. Now press Enter.

  3. If the gclid is present on the final landing page URL, you're golden. If not, keep reading to learn about your alternatives.
Scenario 2
If your destination URL already has query parameters and looks something like this: www.i_will_redirect_you.com/?param=a&param2=b:
  1. Paste this URL in your browser's address bar and before pressing Enter, append "&gclid=test" to the end, like this: www.i_will_redirect_you.com/?param=a&param2=b&gclid=test.

    (This is why the "?" and the "&" distinction were important to note earlier. It's a matter of URL syntax. Luckily, auto-tagging knows the difference.)

  2. Press Enter.

  3. If the gclid is still there, you're in good shape, and need only to enable auto-tagging. If not, what are your options? Read on.
If the gclid is not retained during your test, you're not out of luck. Here are a couple of suggestions:

Suggestion 1. Ask your friendly admins or third-party contact to please configure their servers to pass the gclid. If you're not sure what this means, don't worry, your server admin does. It's like repeating something in a foreign language you don't speak. If your pronunciation is good, a native speaker will understand you and all will be perfecto!

Suggestion 2. If suggestion 1 isn't possible, you'll need to manually tag your destination URLs instead of enabling auto-tagging. (This is one of the very few circumstances in which you should manually tag destination URLs in AdWords.)

The best way to get started with manual tagging is to use the online URL Builder. You'll need to fill in your landing page URL and fill in the campaign name, source, medium, and term (keyword). Then, press "Generate URL" and you'll have a URL that will correctly report campaign information to Google Analytics.

You probably already know how to use this tool based on an earlier post we made, but here is an example followed by step-by-step instructions on a recommended way to use i:


Step 1. Put the final landing page URL in the Website URL field. The reasoning behind this is that since the gclid is stripped by the redirects, the manual tags will most likely be stripped as well. In our example above, www.example.com is the URL to which Adwords users are redirected.

Step 2. Fill in each of the additional fields as follows:
  • Campaign Source: "google" in lower case

  • Campaign Medium: "cpc" for cost-per-click campaigns or "cpm" for our cost-per-impression campaign model

  • Campaign Term: fill in your AdWords keyword

  • Campaign Content: if tagging your keywords individually, leave this field BLANK. If you're only tracking Google ad unit performance, as in the case of running a campaign that is running exclusively on our content network, fill in an ad unit identifier, such as a text ad's headline or the name you've given your display ads.

  • Campaign Name: this is the name of the campaign you've set up in the Google ad system. Assuming you've linked your Google Analytics and Adwords accounts, it is important to type in the campaign name exactly as it appears in our ad system. Otherwise, the Clicks tab of the Adwords Campaigns report in Google Analytics will have multiple entries for the same campaign. Cost information such as impressions and clicks will be listed next to the campaigns that are running in our ad system, while visit information will be listed next to the campaign names you've typed into the URL Builder, and that would just be confusing!

When you generate the URL, you will end up with something like this, personalized with your keyword and campaign, etc.:
http://www.example.com/?utm_source=google&utm_medium=cpc&utm_term=keyword&utm_campaign=Adwords%2BCampaign%2BA

Once a person clicks on an ad and finishes her journey through the land of redirects, she'll see the URL above in their address bar. Also, in the case of third-party redirects, this is the URL you'll want to send to your vendor to convert into tracking tags.

If you're running a campaign with many keywords, here's a helpful tip: Only use the URL Builder for the first URL. Then, use Excel's handy "concatenation" function to create an Excel worksheet that generates the rest automatically.

Even if your campaigns are free of redirects, it's still a good idea to test for auto-tagging compatibility before enabling it. You may still need to have that cryptic conversation with your server admins about "configuring the server to pass the gclid." In any case, never use auto-tagging and manual tagging in the same Adwords account. Even though your users won't be affected, your Google Analytics reports will not be accurate and you'll spend more time trying to make sense of the numbers than optimizing your Google campaigns.

As always, happy tracking! And now back to Buffy…