Destination Goal examples
Conversions based on users viewing a specific page or screen.
This article explains how to configure Destination Goals in the most common scenarios. For more general information about how to set up Goals, read Set up and edit Goals.In this article:
To configure Goals for these types of URLs:
- First verify that the URL for the Goal is both unique to that page/Goal, and consistent from view to view.
If the URL is the same across multiple steps in the Goal process, see Identical URLs Across Multiple Steps (below). If the URL changes from view to view, or if it has name/value parameters, see the instructions for dynamically-generated URLs.
- Destination: Enter the request URI part of the Goal.
The request URI is that part of the URL that comes after the domain address. Using the URL examples listed above, you would enter:
- Case sensitive: Check this box only in the situation where you want to match only one of two identical URLs which differ only by case (e.g.
- Match Type: Use the match type that works best for your purpose. In most situations, the default (Equals to) match works well. See Match types below for more details.
- Value: If you have an imputed value for your page, turn this option on and enter that value in the field. See About Goals, Goal Value for more information.
To track transactions, you'll need to add Ecommerce tracking code to your shopping cart. This allows Google Analytics to calculate the Revenue and ROI metrics from purchases on your site. However, it's often useful to also create a Destination Goal to signal the completion of an ecommerce transaction. Setting up a Destination Goal will allow you to see the percentage of sessions that resulted in at least one transaction (i.e., this will be the conversion rate for that Goal).
If you set up a Destination Goal to signal the completion of an Ecommerce transaction, leave the Goal Value field blank. The actual value of the transaction will appear in the Revenue metric (not the Goal Value metric) and will come from the Ecommerce tracking code in your shopping cart.
Once you have defined Ecommerce tracking and can verify that the transaction data is being sent to Analytics, configure your Destination Goal as follows:
- For Destination: Supply the URL for your "thank you for purchasing" page. For example:
- Match Type: Typically, Begins with is the best choice for shopping pages, since shopping cart URLs often append a number of parameters to the end of the URL to pass data to the Ecommerce server. You can test your shopping cart to determine the structure of the URL and set the match accordingly. See Match Types below for more details.
- Goal Value: If you’re tracking an Ecommerce transaction, leave can this blank. Use the Revenue in your Ecommerce reports to see how much an action is worth.
Dynamically generated or variable URLs
If your URLs include query terms or have parameters at the end, use either Begins with or Regular Expression match types when entering funnel or destination Goal URLs. Examples of dynamic or variable URLs are:
See Match Types below for more details.
Identical URLs across multiple steps
In some situations, the URL doesn't change across a sequence of activity. For example, a sign-up process might have the following URL path:
- Step 1 (Sign Up):
- Step 2 (Accept Agreement):
- Step 3 (Finish):
In general, we recommend that you:
However, advanced users may want to track users' progress through a funnel with the same URL for each step. To do this, you need to modify your tracking code to create a virtual pageview for each step in the sequence that you want to track.
If you're using Universal Analytics, you can pass the
ga function a
send command with the
pageview hit type and override the default page value with a URL you fabricate, as described in our Developer Guide. For the above example, the modifications to your analytics.js tracking code might look like this:
ga('send', 'pageview', '/funnel_G1/step1.html'); ga('send', 'pageview', '/funnel_G1/step2.html'); ga('send', 'pageview', '/funnel_G1/step3.html');
If you're using Classic Google Analytics, you can use the
_trackPageview() method along with a URL you fabricate, as described in the Virtual Pageviews section of the Asynchronous Migration Examples guide. For the above example, the modifications to your ga.js tracking code might look like this:
_gaq.push(['_trackPageview', '/funnel_G1/step1.html']); _gaq.push(['_trackPageview', '/funnel_G1/step2.html']); _gaq.push(['_trackPageview', '/funnel_G1/step3.html']);
Finally, define your Funnel and Destination Goal URLs using the ones you created in the tracking code modifications.
Goals for multiple criteria
You can define a Goal for multiple criteria, such as an interaction with two specific sections of your website, or a go to any page within a sub-directory of your website. To do this, use Regular expression as your match type. See Match types below for more details. The following examples illustrate these scenarios:
^/sports/.*to match a Goal when any page within the sports directory is viewed
sports.html|music.htmlto match a Goal when a user views either the sports.html or music.html pages
Tips for setting up Funnels
When you create a Destination Goal, you also have the option to create Funnel for that Goal. A Funnel is a sequence of pages that you anticipate users seeing before they reach the Goal. Report data for the Funnel appears in the Funnel Visualization report.
Before creating a Funnel, keep in mind the following:
- Test the sequence on your website, and make a note of all pages that make up the entire sequence of activities you want to track for the Goal.
- The final page of the sequence is the actual Goal, and its URL should be entered in the Destination field, not the Funnel section.
- The match type you select for the Destination also applies to any URL in the Funnel section.
- Omit the domain name of the URL in each Funnel step (e.g.,
http://www.example.com/aboutUs.htmlshould be entered as
- If you make the first step of the Funnel mandatory, the conversion count for the Funnel Visualization report will include only those users who reached the Goal via that first step. Otherwise, the conversion count for the Goal will be the same in all reports.
To define a Funnel:
- Open or create a Destination Goal.
- Turn on the Funnel option, and enter a name for that step that you want to appear in the Funnel reports. For example, you might want to use Welcome as the name for welcome.html.
- Enter the URL for the first page in the Funnel for Step 1.
- To make the first step required, click the Required step toggle to turn it ON.
- For additional Funnel steps, click +Add another Step, and supply the name and URL for each page. Note: Remember not to enter the final page of the process in the Funnel section, but in the Destination field.
- When you have finished adding pages, click Create Goal (or Save Goal).
To verify that the Funnel is working, view the Funnel Visualizations reports to see data there.
Match Types: Begins with, Equals to, & Regular Expression
There are three diferent match types that define how Google Analytics identifies a URL for either a Goal or a Funnel. The match type that you select for your Goal URL also applies to the URLs in the Funnel, if you create one.
- Equals to—for standard, fixed URLs:
An Equals to match is an exact match on every 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.
This option requires that the URLs you provide for your Funnel or Goal exactly match the URLs shown in the reports. There can be no dynamic (changing) information in the URL such as session identifiers or query parameters.If you are using an Equals to match for a Goal (e.g.,
/shopping/thanks.html), leading or trailing whitespaces in the Destination field will invalidate the Goal.
- Begins with—to eliminate trailing URL parameters:
This 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.
If your website has dynamically generated content, use a Begins with match filter and leave out the unique values.
For example, a URL that a particular user went to might be
http://www.example.com/checkout.cgi?page=1&id=9982251615. In this case, the
idvaries for every other user. You could still match this page by using
/checkout.cgi?page=1as the URL and selecting Begins with as your match type.
- Regular Expression Match—for matching on multiple criteria:
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 webpage.
For example, if a user could be coming from one of many subdomains, and your URLs use session identifiers, you could use a regular expression to define the constant element of your URL. For example,
http://sports.example.com/checkout.cgi?page=1&id=002as well as
As another example, you could use regular expressions to set a Goal for a user goes to any page in a subdirectory:
Verifying Correct URL Expressions for Goals
You can verify that you have written a Goal URL correctly by searching for the page in the Pages report using the exact URL or regular expression you want to use in creating your Goal. If you are able to successfully view the pages you expect after doing a search, you can safely assume your URL or expression will work.Examples
Suppose your pet store website has a number of pages in a single directory, and you want to use a Begins with match URL to create a goal only for the fish-related pages, which all have the same structure:
To determine whether your matching URI works, go to the All Pages report for your site, click the advanced button, and choose Include, Page, and Begins with before the search field. To match the URLs above, you would enter /supplies/fish in the search field. If your search returns those pages you expect to match, you can use that same URI string as your Goal URL.
Regular Expression Match
Because the All Pages report allows regular expressions in the search field, it's a great place to verify whether your regular expression will work as a Goal. For example, the Analytics documentation on Google Developers Site for Analytics has a number of pages that have collection as part of the file name. For example:
While many of those files are in the
/collection directory of the site, some of them don't. In order to set a goal that converts on all traffic that goes to pages with collection as part of their name, a regular expression is required. A search in the All Pages report in the Behavior Reporting section using the regular expression
.*collection[^/]*html$ verifies that this expression matches all files that contain collection and no other files.