Analytics Goal Workshop, Part 2: Pages Playbook

June 26, 2012

Consult Our Pages Playbook

With all the buzz about attribution modeling and the ever present need for conversion optimization, you may have been wondering, “How can I get my hands on some multi-channel data?” If you have Google Analytics, all you have to do is set up one goal and you’re on your way. First make sure you have a strategy – a purpose and a plan – then dive into your analytics goal settings. Follow the steps below to set up some goals (ideally, more than one) and collect smarter data.

Step 1: Decide between pages vs. events

To set up the most common type of goal in Google Analytics, a URL Destination goal, you need to choose which pages to set as goals. This means you decide to count a visit as a conversion when someone views a specific page – the receipt page for e-commerce sites or non-profits collecting donations, or the “thank you for submitting the contact form” page for lead gen sites.

Your site may have thank-you or confirmation pages for other things visitors can do, like accessing online tools, making appointments, or leaving ratings or comments. Or there may simply be important pages that you want visitors to see. You can set any or all of these as goals.

Sometimes it’s not the view of a page that marks a conversion, but something a visitor can click on the page, like downloading a file, or sharing an article, or making a selection – any type of button or link. For those actions you almost always want to use event goals instead of page goals.

I say “almost always” because if you want to set up a funnel – a series of steps that lead up to the final URL Destination goal – you can’t put events in those steps. But you can use “virtual pageviews” in funnel steps, and I’ll cover those along with event goals in my next post.

Once you’ve decided on a few important pages to set as URL Destination goals in Google Analytics, all you need to do is go look at those pages on your website, copy the URLs into the goal setup box, and you’re done, right? Well… maybe.

The way the URL looks in the browser isn’t always the way it ends up in your data. Customized tracking code or account configurations like profile settings and filters may alter the URL on its way to your content reports.

Step 2: Check the URLs already in your reports

Let’s say the URL you want to set as a goal is http://www.mysite.com/thankyou. You’ll probably want to enter /thankyou in the goal setup box, and Google Analytics suggests exactly that. But I suggest you check your content reports first, to avoid losing a couple days wondering, “Where’s my goal data?”

Search Your Content Reports

Check your URLs by searching to see what Google Analytics will find when you enter /thankyou (or whatever your goal URL is) in the search box of your Content > Pages report as shown above.

A basic search like this finds every row in the table that contains what you entered. So you’ll find /thankyou (if it’s there), but you may also find URLs such as:

/thankyou?queryparameter=stuff-ok-to-ignore

/thankyou?queryparameter=stuff-not-ok-to-ignore

/thankyou/defaultpage.html

/thankyou/subdirectory

/subdirectory/thankyou

www.mysite.com/thankyou

www.myothersite.com/thankyou

If you don’t find anything, make sure there’s GA tracking code on the page. Then if you find code on the page, make sure it’s not rewriting the URL… if it is, there will be another URL in the line with _trackPageview and that’s what you need to search for in the content reports.

If the URLs all correspond to the thank-you page you want to track, you’re good to go. In other words they’re all just /thankyou, or like the URL in the first case where there are session IDs or other query parameters that are okay to ignore (because those are still thank-you pages you want to count). Skip to the step 3 below.

But the query parameters might identify different types of thank-you pages, or there might be settings in place that add a default page to the end of certain URLs. There could be a subdirectory after /thankyou, or a subdirectory or domain name in front of /thankyou, depending on your site.

Determine which URLs actually correspond to the pages you want to track as goals and proceed to the next step.

Step 3: Enter the Goal URL and select the match type

Google Analytics is going to look at the URLs in your content reports when it tries to match what you enter in your goal setup. So knowing what’s in those reports is essential. Now you’re ready to enter the Goal URL and select a Match Type.

Enter Goal URL and Match Type

If all the URLs you want to match look exactly like /thankyou or /subdirectory/thankyou or www.mysite.com/thankyou, with no default page or query parameter stuff after:

Enter /thankyou or /subdirectory/thankyou or www.mysite.com/thankyou in the Goal URL box and choose Exact Match.

If all the URLs you want to match start the same way, like /thankyou or /subdirectory/thankyou or www.mysite.com/thankyou, and have stuff after that like /defaultpage or ?queryparameter=stuff-ok-to-ignore:

Enter /thankyou or /subdirectory/thankyou or www.mysite.com/thankyou in the Goal URL box and choose Head Match.

If you need to match some other combination of URLs:

Enter a specially formatted URL (see below) in the Goal URL box and choose Regular Expression Match.

Two Examples of Regular Expression Match

The simplest way to match two URLs is with the pipe (the vertical bar above the enter key, shift+backslash). This matches /thankyou OR /subdirectory/thankyou:

/thankyou|/subdirectory/thankyou

To make sure that the URL you match ends a certain way, use the dollar sign. This matches /thankyou, NOT /thankyou/subdirectory (or anything else after):

/thankyou$

If you’re using Regular Expression Match on a URL that contains dots or question marks, insert a backslash in front of them (they are special characters in regular expressions):

/thankyou.html?queryparameter=stuff$

Double check your regular expressions and make sure they match the URLs you want with the advanced search in your content reports as shown below.

Use Advanced Search for Regular Expressions

See our free eBook on regular expressions for more ways to use them in Google Analytics.

Leave the Case Sensitive box unchecked. You may already be using a filter to lowercase URLs anyway (a best practice for nearly all websites).

Step 4: Enter a Goal Value

Even though it’s optional to enter a goal value, you should almost always enter something. Estimate a value if you can, or use a weighted system of points, giving your more important goals higher values, as outlined in part 1 of the goal workshop.

At the very least, enter “1” so that you make a distinction between visits with zero goal value and some goal value. Goal values appear in the goal tabs under “Per Visit Goal Value”.

Exception: for purchases, donations, or anything else you might already be tracking with e-commerce code, you should leave the goal value blank. Google Analytics assigns the transaction value to visits with transactions, and these values appear in the e-commerce tabs under the column “Per Visit Value”.

Transaction values and goal values appear combined in the multi-channel funnel reports under “Conversion Value”. So if you enter anything in the goal value for a visit that already has a transaction value, you’ll be skewing the conversion values in those reports.

Step 5: Add Funnel Steps (Optional)

Follow steps 1, 2, and 3 for all of the pages you want to add to your funnel. Once you determine the URLs and the match types, you’ll need to make sure the match type of the Goal URL covers the match type for all of the funnel steps. You can’t choose each step’s match type individually.

If any of the match types are different, change the match type of the Goal URL to Regular Expression Match and change all URLs as follows:

To change Head Match URLs to Regular Expression Match, begin with a caret:

^/thankyou

To change Exact Match URLs to Regular Expression Match, begin with a caret and end with a dollar sign:

^/thankyou.html$

Remember to insert a backslash in front of dots or questions marks when using Regular Expression Match.

Give each step a descriptive name next to the URL.

Descriptive Names for Funnel Steps

Don’t include the Goal URL in the funnel. The funnel should contain all the steps up to, but not including, the Goal URL.

Finally, read the funnel pop quiz to make sure you know what funnels can or can’t do for your data (and whether you want the “required step”).

Stay tuned for the Analytics Goal Workshop, Part 3: Engage with Events!

What challenges have you encountered when trying to set up URL Destination goals? Have you come up with any special tactics related to setting goal values or funnels? Please share in the comments.