Google Analytics Goals are a way to measure conversions on your website. A conversion occurs when a visitor does something you want them to do. This could be completing some type of high value process or viewing a specific page on your website.
Setting up goals is one of the most important steps when configuring Google Analytics. Without goals, there is no easy way to measure conversions. If you’re unfamiliar with conversion, or the related metric conversion rate, please take a moment to read about why both of these metrics matter. In general, counting the number of conversions and tracking the conversions rate is a good way to measure the success of your website.
During this post I’m only going to cover how goals work and how to set them up. I’ll discuss how to use goals in my next post.
What’s A Goal (Technical)?
At its core, a goal is just a pageview. It’s could be a specific page on your website that you want the visitor to see or the page that is displayed when a visitor has completed a process. A goal is literally defined by the URL of said page. As GA processes site data, it increments the goal counter each time a pageview for the ‘goal’ page is found. It should be noted that if the goal page is found multiple times in a single visit then goal counter is only incremented once.
I’ll explain a little bit more about how goals work, at a technical level, at the end of this post. There’s a few things I need to cover before we get into the nitty-gritty tech stuff.
Creating A Goal
There are multiple ways to define a goal. The method you choose depends on the complexity of your website. The easiest way to create a goal is to copy the URL of your goal page from a browser into the Goal URL text field. So, if the process ends with
http://www.cutroni.com/thankyou.php in the Goal URL field. Here’s another example. If the URL of the goal page is
http://www.cutroni.com/thankyou.php?submit=true then enter
http://www.cutroni.com/thankyou.php?submit=true into the Goal UL field.
A goal can also be defined using a regular expression. Rather than enter an exact URL in the Goal URL field you can enter a regular expression. This is particularly helpful if the website is dynamic. If the goal page contains a unique identifier then you can’t copy and paste a URL into the Goal URL field. Every goal URL will be different. You need to use a regular expression for the Goal URL. I’ll discuss this below in the Additional Settings section.
When defining a goal you also need to give the goal a name. There’s nothing special here. The Goal name will be used to identify the goal in the Google Analytics reports. Don’t use anything too long, it can make the reports difficult to read.
The Activate Goal setting is an on-off switch. Switching the setting to ‘Off’ will stop tracking for the goal. Why would you want to turn a goal off? Google Analytics will calculate an overall website conversion rate using all of the goals you define for the site. If you create a goal that is temporary, say for a specific campaign, then it could artificially skew the overall site conversion rate if you leave the goal on after the campaign, ends.
Each goal has an Additional Settings section that can help configuration in unique situations. It’s located at the bottom of the page under the Funnel settings. By the way, you do not need to create a funnel when you create a goal. Defining a funnel is optional.
The Case sensitive setting can be used with websites that have mixed-case URLs. So, if your Goal URL value is case sensitive then click the Yes radio button. However, profile filters can affect this setting. I’ll explain more at the end of this post.
The Match Type setting is a powerful setting that can aid in goal tracking. For example, if each goal page contains a unique customer identifier then it will be impossible to paste a single URL into the Goal URL field without the use of the more sophisticated match types. Google Analytics has three different match types that can be used for Goals and Funnels.
When you choose Exact Match the value in the Goal URL field must exactly match the URL of the goal page displayed in the location bar of the visitor’s browser. This is the setting you want to choose if you copy the URL from the browser and paste it into the Goal URL field. If your website uses a unique identifier in the goal URL (like a visitor ID number or an order ID number) do NOT use an Exact Match. Use a Head Match or a Regular Expression.
The Head Match is like a light-weight regular expression. You should use a head match when a small part of the goal URL differs from one visitor to another. With a head match, if the value entered into the Goal URL matches any part of the URL in the visitor’s browser then the goal will be counted. The Head Match will match both path data and query string variables.
For example, if there is a unique identifier in the goal URL then you can use the head match to define the goal. Let’s say the Goal URL for a visitor is http://www.cutroni.com/thanks.html?submit=true&id=12345. The id query string parameter is a unique identifier that will change from one visitor to the next. So, I could use a HEad Match and enter the following into the Goal URL: http://www.cutroni.com/thanks.html?submit=true. Because the Goal URL matches PART of the actual URL for the goal page, GA will count this goal.
This setting defines a goal using a regular expression. If the regular expression entered into the Goal URL matches any part of the goal URL then the goal counter is incremented. Using a regular expression is particularly useful because it let’s ‘wrap up’ goal tracking so you track multiple goals in a single goal. You can track multiple goals using a single goal because a regular expression can match multiple URLs. For example, let’s say you want to create a goal that tracks and PDF file download. You could enter \.pdf into the Goal URL field. I actually wrote about using regular expressions to get more out of goals last year.
The final option in the Additional Settings section is Goal Value. Use this field to monetize non-e-commerce goals. For example, if each Contact Form submitted by a user is worth $100, enter 100 in the Goal Value field. Google Analytics will use 100 to calculate return on investment (ROI) and other revenue based calculations. If e-commerce tracking is active for a profile, and you would like to use e-commerce data for your goals, simply leave the goal value field blank. Google Analytics will pull in the e-commerce data.
One thing to note is that the Additional Settings are applied to both the values in the Goal URL and Funnel steps. I know I’m not covering funnels in this post, but this is a common mistake. It is not possible to use an Exact Match for your funnel steps and a Regular Expression for the Goal URL.
Tips, Gotchas & More
Let’s dig a bit deeper and learn how GA actually counts goals. During data processing the value you use to define a goal is compared to the Request URI value. You remember the Request URI, right? It’s part of the URL (everything after the .com, .net or .org). I know this seems strange especially because a goal can be defined by a complete URL, but this is how the data processing works.
It is important to understand that the Request URI is used during goal processing because if you create a filter that modifies the Request URI then it might break your goals.
Here’s an example. Let’s say the Request URI, in its original form, is
/pages/html/index.html. You decide to modify this value using an advanced filter and it becomes
/pages/index.html. If you define a goal using
/pages/html/index.html then the goal will not work. The reason is that the Request URI (
/pages/index.html), which was changed by the advanced filter, no longer matches the value entered as a goal (
How about another example? If you force the case of the Request URI to lowercase, and then define a filter using all uppercase characters AND specify that the goal is case sensitive, then the goal will not work. Get it?
I know this seems strange, especially when most people use an exact match to define their goals. But that’s the way goals work, honest! Don’t be alarmed by this. Using an Exact Match is a perfectly fine way to define a goal.
Here’s a tip. You can also define goals based on data created by
urchinTracker(). Remember, if you pass a value to
urchinTracker() then that data becomes a pageview in Google Analytics. These pageviews can then be defined as goals. You can read more about
urchinTracker() in this series of posts. I’m using this technique to track RSS subscriptions on my blog.
And finally… A great way to debug goals is to use the Top Content report. Remember, a goal is just a pageview. If GA is reporting 0 goals, then check the top content report. Does the goal page appear in the Top Content report? If it’s missing, then there is probably an issue with your page tags. But, if the goal page is present in the Top Content report then there is probably an issue with your goal setup.
Wow… that’s a long post. Does it all make sense? Leave a comment and let me know!
Like this post? Share it: