Analytics & Funnel Optimization

Track Links With Google URL Builder

So… you’re wrapping up all your holiday advertisements this week. You’ve got traffic coming in from Adwords, Facebook, email blasts, Twitter and more. You’re getting great results, your ROI is through the roof and you’re almost on to celebrating. Sadly, when it’s time to analyze trends and individual campaign performance next week you notice a serious problem: You have no idea which ads or sources to attribute fiscal success because you didn’t build links correctly, or at all.

Bummer. That sucks.

But you can redeem your future self. Here’s how:

In order to properly build your links, several tags should be appended to the end of all URLs you wish to track. We’ll use http://vuurr.com/ as an example URL representing a holiday campaign on Facebook.

Before you start, add a ? (question mark) to the end of your base URL and remember to place an & (ampersand) between each utm_tag. Also, all URL building should be written in lowercase:

    utm_source tells Analytics which source the link is coming from. In this example, it’s “facebook,” but it could also be adwords, bing, nytimes, /blog or wherever you embed your link. EX: http://vuurr.com/?utm_source=facebook
    utm_medium tells Analytics what kind of source (a.k.a. medium) the link represents. Adwords, Facebook, Bing and the like are “cpc.” If you’re putting a link in your email, you’d append “email,” in Pinterest you might append “photo,” etc. The example URL builds as follows: http://vuurr.com/?utm_source=facebook&utm_medium=cpc
    utm_campaign is an easy one – it describes your campaign. Because our example is a holiday discount campaign, you’d attribute “discount” (or “holiday_discount” but I prefer to be succinct when possible). If you were sending out an email, you may attribute this to the date it was sent or the discount in the email. For our example: http://vuurr.com/?utm_source=facebook&utm_medium=cpc&utm_campaign=discount
    utm_term is generally only appended to PPC campaigns because it represents the keywords used in the ad (or the adgroup name). However, sometimes I use it just as another modifier for the ad. If you need to use two words, combine them with a + (plus sign), like “holiday+shopping.” In our example, the campaign term is “holiday,” since it’s a holiday ad, making the link now look like this: http://vuurr.com/?utm_source=facebook&utm_medium=cpc&utm_campaign=discount&utm_term=holiday
    utm_content is best used when you’re split testing ad copy. You can either append a description of what you’re testing in the ad or you can number them. If your content tag has more than one word, make it one word in the URL, like “=bluebutton” instead of “=blue button.” I usually just number ads, so if this is the second ad for this campaign or adgroup, the example link would now finish: http://vuurr.com/?utm_source=facebook&utm_medium=cpc&utm_campaign=discount&utm_term=holiday&utm_content=2

You don’t need to use all the utm_tags; your data will attribute to the correct dimensions in Google Analytics to the extent you describe it. When traffic starts to come in and site metrics are recorded, go to Traffic Sources > Campaigns and/or Traffic Sources > Search > Paid to view your incoming campaign links. Switch between “Source/Medium,” “Source,” etc. to see your link building hard at work and compare source performance and future opportunity.

Building correct links allows you to properly and accurately analyze which sources in your marketing strategy are working best and which are ineffective; thus, saving you time, money and resources while you fuel the fires that make you money.

If you have the patience for automatic URL building forms, Google Support has a good one! Keep in mind this URL builder from Google only works for Google. If you’re using a link tracker other than Google, they may use a different _tag.

Minimum Sample Size: How Many Users is Enough?

You’re running a test on one of your landing pages with the primary goal of getting the user to click on a button. You are split testing (A/B testing) two different button colors (green and orange) to determine the impact of the button color on click-through rate. You collect the following initial results:

Button Color Visitors Clicks CTR (y)
Green 38 2 5.2%
Orange 39 3 7.7%

The orange button is better, right?

Not necessarily. Sure, the orange button has a 7.7% click-through rate (CTR) compared to only 5.2% for the green button. However, the orange button has really only earned one more click. If the next visitor on the page clicks on the green button, both variants will have a 7.7% CTR, indicating that button color is irrelevant in this application.

Here is what happens if we run this experiment for several months with 16,000+ visitors:

Button Color Visitors Clicks CTR (y)
Green 8,238 486 5.9%
Orange 7,893 734 9.3%

Is the orange button better now? Hell yeah, it is.

While the danger of making decisions based on too little data is an incorrect conclusion, the danger in collecting too much data is a waste of time, effort and money. Even though there was little data to determine orange was best in the first variant, had you decided to go with the orange button anyway, you could have sent all the above 16,000+ visitors to the page that performs at a 9.3% CTR. Thus, giving you a whole lot more sales/leads/etc.

So how many users are required to make this decision? We can use the following equation:

minimum sample size equation

Where:

  • n is the minimum sample size required to prove that the two variants are statistically different.
  • Z is the z-value corresponding to the chosen confidence interval in the Table of the Standard Normal Distribution.
  • E is typically known as the “error.” In this application, E is the difference between the mean values of two samples.
  • σ is the standard deviation.

The Z-score that corresponds to 95% confidence is 1.64 (from the Table of the Standard Normal Distribution).

For example, let’s say you are using the data in the second table above, and you want to be 95% confident in your decision. E is the difference between the two sample means, so

E = 0.093 (orange CTR) – 0.059 (green CTR)

E = 0.034

To figure out the standard deviation, we can treat binary data like continuous data because of the Central Limit Theorem, which states that as a binary sample gets larger, its distribution approximates a continuous distribution. So, determine the overall CTR as follows:

total clicks = 486 + 734 = 1,220

Total visitors = 8,238 + 7,893 = 16,135

That means the overall conversion rate was

1,220 / 16,135 = 0.0756

In Excel, you can get the σ-value by using the function =NORM.S.INV(1-0.0756) which returns 1.435.

Putting all of that together, the equation to determine what minimum sample size is required to show an accurate, statistically significant improvement of CTR for the tested page with the orange button is:

n = ( (1.64*1.435) / 0.034 ) 2

n = 4791

Therefore. In this example you would need to make sure you have 4791 samples in order to prove that you have enough to make a statistically significant decision over which variant is better.

Most A/B testing software will take care of his for you. What you really need to understand about the equation is:

  • As standard deviation increases (more variation in your conversion rate), you will need more samples.
  • If you want more confidence (95% versus 90%), you will need more samples.
  • As the difference in performance between the two variants becomes smaller, you will need more samples (it takes more data to make sure the difference isn’t just statistical noise).

Easy right? Now get to work.

Infusionsoft Partnercon

We presented the slides below at Infusionsoft Partnercon. If you saw the presentation, thanks for coming out! If you didn’t, all of the slides, notes, code snippets and more are below. If you have questions or comments, please let us know by emailing info@vuurr.com or filling out our contact form.

The Presentation

Form Abandonment Code

YouTube Play as Google Analytics Event

Track Twitter Button Clicks

Track Facebook Like/Unlike/Share Button Clicks

Call Tracking

Use Twimlbin and Twilio to create an easy call tracking solution.

Measure Right The First Time

We presented the slides below at BOLO 2012. If you saw the presentation, thanks for coming out! If you didn’t, all of the slides, notes, code snippets and more are below. If you have questions or comments, please let us know by emailing info@vuurr.com or filling out our contact form.

The Presentation

Form Abandonment Code

YouTube Play as Google Analytics Event

Track Twitter Button Clicks

Track Facebook Like/Unlike/Share Button Clicks

Call Tracking

Use Twimlbin and Twilio to create an easy call tracking solution.