Friday, April 23, 2010

URL Destination Goal Tracking in Google Analytics

Google Analytics offers three types of goals you can setup to track what visitors do on your site. For today’s post I’m going to focus on URL Destination goals. A URL Destination goal lets you specify a page with its “own URL” as a goal.

Google Analytics offers three different match types for URL Destination Goals. You will be able to determine which one to use based on how your site was built:

  1. Exact Match: An exact match is a match on every exact character in your URL without exception from beginning to end. Use this when your URLs for your site are easy to read and do not vary.
    For example, if your goal is http://www.domain.com/shopping/thanks.html, enter /shopping/thanks.html as your goal.
  2. Head Match: A head match matches identical characters starting from the beginning of the string up to and including the last character in the string you specify. Use this option when your page URLs are generally unvarying but when they include additional parameters at the end that you want to exclude.
    For example, a URL visited by a particular visitor might be http://www.example.com/checkout.cgi?page=1&id=9982251615. In this case, the id varies for every other user. You could still match this page by using http://www.example.com/checkout.cgi?page=1 as the URL and selecting Head Match as your Match Type.
  3. Regular Expression Match: A regular expression uses special characters to enable wildcard and flexible matching. This is useful when the stem, trailing parameters, or both, can vary in the URLs for the same website page.
    For example, if a user could be coming from one of many subdomains, and your URLs use session identifiers, you could use a regular expressions to define the constant element of your URL. For example, checkout.cgi\?page=1 will match http://sports.example.com/checkout.cgi?page=1&id=002 as well as http://fishing.example.com/checkout.cgi?page=1&language=fr&id=119
One of the three match types listed above will offer you a solution to setting up a goal to track a URL. Remember, the page you’re tracking can be static, dynamic, or even on a subdomain.