Setting Up Campaigns in HBX and Google Analytics

Again, since I did a presentation on it last week, I thought I might as well blog about it as well. Last week I was talking to our conferences team about how they should use campaigns in HBX (although I’ll explain about Google Analytics here as well) to work out their Return on investment (ROI) of their email campaigns. I thought I’d go through how you should do it in HBX and how you do it in Google Analytics.

The campaigns I am going to be talking about are when you direct someone to your site via some sort of campaign. In HBX, you can of course create campaigns based on many things, not least by putting them in the tags on particular pages (and also you can create a campaign in the same way that you create a conversion point – more on how to create conversion points later).

First off in HBX you have to work out how you are going to do it. We’ve decided that we want to do it dynamically (ie not having to set up the campaigns in the user interface). There are many ways of doing this as well. You have two parameters in your HBX tag under campaigns, which we’ve altered slightly:

  • hbx.dcmp = “_P::cp” and
  • hbx.hra = “_P::attr”

Why have we done this? Mainly so that when we put our campaign codes on our destination urls, we don’t have to worry about duplicating query strings created by other codes.

HBX campaigns work by using query strings on the end of urls. If you have url rewriting systems (which strip out query strings), then you’ll need to instruct the HBX tag to pick the campaign code up out of a session cookie (which in turn would have picked it from the url before the rewriting). In theory though, you’ll still need to put the query string on the end of a destination url.

The first thing to check is that you’ve got your destination url properly. If you are using vanity urls and redirects, you’ll need to redirect to the full campaign code version or make sure that your redirect keeps the campaign code (or stores it in a session cookie).

The next is to see if it has a query string on the end. Query strings on the ends of urls are used for many things (eg printer friendly pages, etc). A query string on the end of a url starts with a question mark (?). If there isn’t a question mark already, you’ll need to add one. If there is one already, then each set of attributes is split with an ampersand (& – anyone know why it is called an ampersand?). Then you attach your campaign code on the end as such (this is for a paid search campaign):

http://www.fwi.co.uk/Home/Default.aspx?cp=KNC-AGFW-adwd-cows

How is it broken down:

  • URL (http://www.fwi.co.uk/Home/Default.aspx)
  • Start query string (?)
  • HBX campaign starts (cp=)
  • HBX campaign type – this is a paid search campaign (KNC)
  • Industry and site – Agriculture and Farmers weekly, as we have many websites in the same market (AGFW)
  • Who the campaign is with – Google adwords, Yahoo!, MS adcenter, etc (adwd)
  • Campaign name (cows)

For paid search campaigns, Analytics systems will tend to assign all referrals as organic unless you specifically tell them so. You do this in HBX by assigning the start of the campaign code as being KNC or KNL (for lead generating campaigns).

Here we have an newsletter campaign (although this principle works for all email campaigns) and I always like email campaigns to work slightly differently:

http://www.fwi.co.uk/Home/Default.aspx?cp=NLC-AGFWweekly-20080624&attr=topleft

  • URL (http://www.fwi.co.uk/Home/Default.aspx)
  • Start query string (?)
  • HBX campaign starts (cp=)
  • HBX campaign type – this is a newsletter campaign (NLC)
  • Industry and site – Agriculture and Farmers weekly, as we have many websites in the same market (AGFW)
  • The actual newsletter name itself – this one is just called ‘weekly’
  • The date that it was sent on – this is important if you send the same newsletter frequently (20080624)
  • Start of a new parameter on the query string (&)
  • The secondary attribute in HBX (attr=)
  • Any split that we may want from the links in the newsletter (topleft)

And that is it. HBX has a number of campaign types, but I always find these are the most common (KNC for paid search, EMC for email and NLC for newsletter). Here are the others that you can use:

  • AFC Affiliate
  • BAC Banner Ad
  • CAC Classified Ad
  • DMC Direct Mail
  • ILC – Internal Link
  • LEC Link Exchange
  • OTC Other
  • PAC Print Ad
  • RAC Rich Media Ad
  • SPC Sponsorship

Don’t forget that HBX is case sensitive!!!

In Google Analytics it works slightly different. There is a really good explanation by Justin Cutroni which I am going to do a bit of copying and pasting from.

The principle remains the same. You put the campaign on the end of your destination url and Google picks up the campaign code from there. The campaign parameters that you set in HBX are slightly different. In Google every thing is free form, there are no standards to follow. However that shouldn’t stop you setting up a naming convention, otherwise you won’t know what the hell is going on.

Firstly you don’t need to do anything with your Google Adword campaigns. You can just link them in your user interface in adwords. Firstly, give your Google Analytics account admin rights to your adwords account. This is really easy:

  1. Login to Google Analytics
  2. Click on ‘edit’ next to the site that you are linking underneath the ‘Settings’ column
  3. In the bottom box (Users with access to Profile) click add user (in the top right hand corner of said box)
  4. Under ’email address’ give the adwords account ID, also fill in the name of the person
  5. Access Type should be set to ‘Account administrator’
  6. Click Finish

Now you just need to link the two accounts together and this is how you do it:

  1. Log in to your AdWords account at https://adwords.google.com.
  2. Click the Analytics tab.
  3. If you already have an Analytics account, click I already have a Google Analytics account.
  4. From the Existing Google Analytics Account drop-down list, select the name of the Analytics account you’d like to link to.
  5. Keep the checkboxes selected on this page
  6. Click Link Account.

Now your adwords and your analytics accounts are together, all your campaign details – visits, clicks, etc – will appear in your analytics account.

You don’t have to do any tagging for Google Adword campaigns in Google Analytics.

For your other accounts you will have to, so make sure you set them up as Justin says. Put them in the query string as you did with HBX. You can choose how you set them up. Alex Cohen on his Digital Alex site has a great recommendations on how to set these up, so I won’t copy him too much. Here are his suggestions on the campaign medium parameter (utm_campaign):

  • Affiliate – affiliate
  • Comparison Shopping Engine – cse
  • Email – email
  • Local Search – local
  • Offline media that drives online click-through – offline
  • Paid Inclusion Bulk – paid-inclusion
  • Pay Per Click Search – cpc

That last one is vitally important for your other search campaigns (MSN, Yahoo!, etc) because you want them all grouped together in Google Analytics with Google Adwords.

What you end up with is a url that looks similar to our HBX one, but with different parameters:

www.fwi.co.uk/Home/Default.aspx?utm_medium=email&utm_source=AGFW&utm_campaign=weekly-20080624&utm_content=topleft

Next time we’ll go through how to pick up results from these.

4 Comments on “Setting Up Campaigns in HBX and Google Analytics

  1. Hey – i have been looking for a decent walk-through with definitions of common codes etc for SO long it is a joke – seriously, this is the best guide I have read.

    I’m booked on an official HBX Campaign management course in a few days – ill be happy to post back some more tips if i find any 🙂

    Good work.

  2. Can you kindly direct me to where I can find basic info. such as what is the difference between HBX vs Site Catalyst vs Dart vs Google Analytics.(I know this is all apples and oranges, but I want to understand what each of these do and how they are connected.)

  3. Hi Vivek,

    You’re asking an awful lot in a short space!

    HBX is an almost defunct analytics tool that is now owned by Adobe. They also run Omniture SiteCatalyst. They’re both paid for Analytics tools. Check out Omniture’s website for more information.

    Google Analytics works in the same way as SiteCatalyst and HBX, but is a free option. Being free, it obviously has a different set of features because of this.

    DART is a different system. DART predominantly works by tagging the output of one site and measuring its interaction on another site. So for example you would put some code on an outbound link of shop.com when sending people to shop2.com. This code would redirect users to the right page on shop2.com, but would record that the user had clicked on the link. When the user buys something from shop2.com there is a javascript tag on the bottom of the ‘thank you’ page that sends a signal to DART. If DART can link up the cookie from the ‘thank you’ page to the click from shop.com then it can attribute the sale to shop.com. This allows shop.com to bill shop2.com for the amount of sales they have driven. Look at Doubleclick’s website for more details.

    Hope that helps,
    Alec

Leave a Reply to Howard Cancel reply

Your email address will not be published. Required fields are marked *

*