Tracking Internal Campaigns with Google Analytics

Internal campaigns are marketing efforts that are run on your site and promote your products and services. Here’s an example from the Boton Red Sox site. They’re using ads on the homepage to promote ticket sales.

Companies should track how people react to these campaigns and which ones are most successful. But what’s the best way to do this with Google Analytics?

Some people use the standard campaign tracking to track internal campaigns. THIS IS INCORRECT AND SHOULD NEVER BE DONE. Using the standard campaign tracking for internal campaigns will cause problems with your source data. So don’t do it!

There are a few correct ways to track internal campaigns. You could use Event Tracking, Custom Variables or Virtual Pageviews. But I like to use GA’s internal campaign tracking tool.

What? You’ve never seen or used the GA’s internal campaign tracker? It’s in the profile settings and it’s called Site Search tracking! Did I fool you ;)

Site Search can easily be configured to track internal campaigns. Let’s walk through the steps to set it up and then the data and analysis.

Step 1: Create a New Profile

Because we’re using Site Search for an unintended purpose it’s best to configure these settings on a new profile. It’s not possible to use Site Search for both tracking internal campaigns and internal site search within the same profile. You need to have a separate profile to track internal campaigns.

Step 2: Tag your Internal Campaigns

Once you’ve created your new profile it’s time to tag your internal campaigns. Internal campaigns need to be tagged in a similar manner to external campaigns: you need to add query string parameterrs to your internal ad.

However, unlike external campaigns you do not use the standard link tagging parameters (utm_campaign, utm_medium, etc.). You get to make up your own parameters!

You can use one or two parameters for internal campaign tracking and you can name then anything you want. The reason you can use one or two parameters is that GA’s site search configuration uses two parameters, one for the search phrase and one for the search category.

Whatever you choose, make sure the parameters are not used for anything else.

TIP: Check your Top Content report for a complete list of your site’s query string parameters. Verify that the parameters you create are NOT in this list.

For the sake of this post I’ll use the parameter icn (shor for internal campaign name). This parameter will holds the name of the internal campaign. I’m going to use the following format for the value of the campaign name parameter

icn=[internal-campaign-name]

I mentioned that you can use two paramters. You don’t need to use two, but GA’s site search can be confiugured to track the internal site search phrase and a site search category. We’ll use the category paramter to track the internal campaign name.

I’m going to name the second paraeter ici (short for internal campaign info). Again make sure the parameter you’re using does not already exist. This second parameter let’s me collect details about the ad the visitor clicked on and the location of the ad.

Here’s a basic format:

ici=[ad-creative]_[location-on-the-page]

You can see that I’m stuffing a lot of information into the parameter. You can put whatever you want and GA will gladly suck it in. By adding more information we’ll get a granluar view of how the internal campaigns perform and which locations and variations lead to tbe most conversions.

If you don’t have different types of internal ads, or just don’t care about this level of detail, then you can ignore the add internal campaign info parameter. It blank, it’s up to you!

Now you need to define the values for all the ads. Thic can get messy if you’re running a lot of internal campaign. But you can do it, just be organized! Use a spreadsheet to keep track of all the values you use.

Once you’ve got al your parameters it’s time to tag your links. The exact process depends on your site. You may need to change static links, like this:

< a href=”/internal-page.php?icn=2010-spring-sale&ici=stubs_home-roller >

Or if you have complicate flash ads you may need to get inside the Flash code. It depends on your site.

The bottom line is when somone clicks on an internal ad you want to see your internal campaign parameter on the next page. If you don’t see the parameter in the URL then you did something wrong.

You can use the sample spread sheet below to track the different parameters you use for your internal campaigns. The spread sheet also has a formula in column D to automatically add the parameters to your URLs.

NOTE: There is an iFrame in this post. If you can not see it, you can view the original post here or view the Google Spreadsheet here.

Once youe’ve got the parameters added to your links it’s itme to configure the Site Search settings.

Step 3: Configure Site Search Settings

Remeber, we’re configuring these settings on a new profile so we don’t break the site search in our main reporting profile.

Site search has three settings. First, turn site search on.

Next, tell GA the name of the paramter that holds the site search phrase (in this case it’s out internal campaign name) by adding the parameter to the ‘Query Parameter’ filed.

Next, choose Strip Query String Parameters. This setting will remove the parameter from the URL after GA processes the data. This is a good idea because it reduces duplicate pages in your top content reports.

TIP: You probably want to exclude your internal campaign name parameter, and internal campaign information parameter, from your other profiles. It can really mess up your pageview data.

If you’re using an internal campaign information parameter configure the Site Search Category settings the same way. Just make sure you use your internal campaign info parameter in the ‘Category Parameter’ setting.

Here’s how the settings look using the parameters from my example:

That’s it! Let’s look at the data.

The Reports

Let’s start by answering a simple question: do people who respond to internal camapigns convert more or less than those that do not respond to internal camapigns? To answer this question use the Content > Site Search > Usage report. Here we can see that there were only eight visits that clicked an internal campaign. Sad! But it’s just test data.

Now let’s drill deeper ad identify which inernal camapigns are most effective. Use the Content > Site Search > Search Terms report. Rather than search phrases this report contains the names of all internal campaigns. Again, what was the response to the campaign? Was it worth the effort? Don’t forget to check the Goals tab and the Ecommerce tabs (if applicable) to measure outcomes!

But let’s drill deeper to understand which ads within those campaigns are working. Click on a campaign name and choose Category from the Analyze drop down.

Now we’re looking at all of the information that we put into the ici query string parameter for this particular campaign name. If we had multiple internal ads we’d be able to differentiate ad placements and creative variations.

Don’t forget to use the Goals and Ecommerce tabs to measure outcomes! This is what most people want to know: did internal campaigns, and specifically which internal campaigns, generated revenue and conversions?

But we can do more. Now change to the Content > Site Search > Start Pages report. Now you can see which page people were on when they click on an internal ad. Again, more insight into where visitors responded to an internal campaign.

And for all those marketing folks that are so concerned with internal campaigns, how about creating a nice custom report and automating the delivery or, better yet, use the Custom Report Sharing feature to share this report with others. People will love this because you can change the wording so it does not say Site Search it says Internal Campaigns Report.

But wait, there’s more! What about using a secondary dimension to view the external marketing campaigns (or sources, or mediums) that drive visitor to react to internal campaigns. Perhaps the extrnal creative has some influence over how visitors react to the internal campaign creative. The data isn’t so hot in the image below, but you get the idea.

And finally, the ultimate in analysis, internal campaign attribution. We can use the Search Term Refinement feature if visitors click on multiple internal campaigns. Google Analytics will track all subsequent site searches, but in our case follow up site searches are actually additional internal campaigns that the visitor responded to. Honestly, I have never found any insights from this type of analysis, but you can do it if you want!

Ok, I’ve officially entered nerdville.

I think you get the idea. By adding all this data you can do many different kinds of segmentation and analysis. More than enough to understand the behavior of your site visitors and how your internal campaigns perform.

Last but not least, I’ll mention that you can track internal campaigns using events and custom variables. But both of those solutions require coding. And that requires working with IT. Using Site Search, in most cases, will not require any code changes to your site.

Google Analytics Campaign Tracking Pt. 2: The EpikOne Link Tagging Tool

In Part 1 of this series I explained that Google Analytics campaign tracking is based on a technology called link tagging. Link tagging is the process of adding business information to the URLs that we use in our on-line ads. But how do we actually tag these links? Some marketing campaigns can have hundreds, or thousands, of destination URLs. Google has provided a tool for us called the URL Builder. It’s great if you only have one or two links to tag, but it can’t handle hundreds of links.

To manage our link tagging effort we’ve created a tool in Google Spreadsheets that automatically generates tagged destination URLs. All you need to do is fill in the values for the Google Analytics tracking variables and a built in formula does the rest. Here’s a link to the file. Please help yourself :)

http://spreadsheets.google.com/ccc?key=p7c_HKcmspSUfEYSO0gskKw&hl=en

EpikOne Link Tagging Tool

How to Use The Tool

1. Click on the above link to open the Google Spreadsheet. Once open, use the menu in the top left corner (File > Export >xls) to export the file to your hard drive.

2. Once you have the file on your machine, open it using MS Excel.

3. Delete all the demo data in the file EXCEPT the equation in cell G8. Cell G8 contains the equation that does all the work.

4. Enter your campaign information into the corresponding columns. Enter a dash (-) for all variables that you are not using. You should always use the campaign, medium and source variables.

5. Add the destination URL to the destination URL cell. Don’t worry if your destination URL already contains query string variables, the tool is smart enough to handle them.

6. Cell G8 will automatically build your destination URL.

7. Continue entering your campaign data in new rows.

8. Copy the formula in cell G8 to other rows. The tagged destination URL will be created automatically.

After you have your destination URLs you can paste them into your on-line ads.

Let me know if you find this tool useful or a complete pain in the as*. Got a better tool and feel like sharing? Post a comment below!

*** Note: EpikOne assumes no liability for those that choose to use this file. ***

How Does Google Analytics Track Conversion Referrals?

Visitor campaign information is stored in a cookie on the visitor’s machine. This cookie stores the referral information for the visitor’s session. This cookie tracks organic referrals, tagged campaign links, un-tagged referral links and direct visits.

Each time a visitor visits your site the Google Analytics Tracking code updates this cookie with the appropriate campaign information. When the cookie is updated GA discards the previous campaign information. As a result GA only tracks the current campaign information, not previous campaign information.

With that said, there is a ‘pecking order’ regarding which activities will overwrite the the data in the campaign tracking cookie. Let’s review how GA buckets your traffic in terms of referral information:

  • Campaigns: links that you have tagged with campaign information
  • Referrals: untagged links on other web page
  • Direct: people who type your URL into a browser
  • Organic: organic search engine traffic

Here is how GA updates the campaign tracking cookie based on referrer:

  • Direct traffic is always overwritten by referrals, organic and tagged campaigns
  • New campaign, referral or organic link that brings a visitor to the site always overrides the existing campaign cookie

Here’s an example. A visitor visits your site from a newsletter with tagged links. They look around and decide to leave. When they leave your site the campaign tracking cookie will persist and indicate that they originated from the newsletter.

The same visitor decides to come back the next day and types your URL into the browser. The campaign cookie will still indicate that the visitor arrived via your newsletter because the second visit was a direct visit, and direct traffic does not overwrite existing campaign information.

With that all said, you can configure GA to NOT overwrite the campaign data that is stored in the tracking cookies. This let’s you identify the first campaign that brought the visitor to your site. Here is the link:

http://www.google.com/support/analytics/bin/answer.py?answer=27247

However, this technique does NOT prevent the Google Analytics Tracking Code from updating the campaign cookie if a visitor arrives by organic search or untagged referral link. This technique can only be used to prevent tagged campaign links from overwriting previous referral information from a tagged campaign link.

So how do you get around this? Well we’ve come up with a hack that we’re using with a few of our clients. The goal is to store all referral information about a specific visitor across all of their visits so we get a better understanding of the sales cycle.

The Google Analytics Tracking Code re-writes the data in the campaign tracking cookie every time the visitor hits the site. We need a mechanism that can store data across multiple sessions and would only update the referral data and not overwrite it. To do this we wrote some JavaScript that uses the custom segment functionality to track the visitor’s referral information.

Here’s a brief outline for what the JavaScript does:

  • When visitor lands on the site check the previous referral information.
  • If there is no previous referral info then gather the referral info and store it in a custom segment using utmSetVar()
  • If there is previous referral info, then UPDATE the custom segment to include the current referral information

While this isn’t an ideal situation it does help. Using the User-defined report we can identify conversion rates for the various combinations of referral information that drove the visitor to your site during the sales cycle.

Obviously this takes some technical know-how. But if you’re working with a client, and the client wants to know EVERY step in the process then this is a hack that can help.

So there you have. Some information about how Google Analytics tracks referral information. I think there are two key things to remember.

  1. Not all referral information is created equal
  2. You can configure GA to let your campaign information persist

You may also be interested in the series I wrote about Campaign Tracking with Google Analytics:
Google Analytics Campaign Tracking Pt. 0: An Overview
Google Analytics Campaign Tracking Pt. 1: Link Tagging
Google Analytics Campaign Tracking Pt. 2: The EpikOne Link Tagging Tool
Google Analytics Campaign Tracking Pt. 3: Reports and Analysis

Thoughts? Questions? Leave a comment.