In this article, you’ll learn:
NOTE: If your VWO account is enabled with Data360, you will be able to use Metrics instead of Goals for tracking standard and custom events on your website. However, the concepts explained in this article are parallelly applicable to Metrics, as well.
To track goal conversions for your test, you need to specify the page URLs where you wish to record the conversion. VWO allows you to enter specific URLs, page patterns, or regular expressions (regex) of the pages where you want to record goal conversion.
Suppose if the goal is to check how many users access a particular page of your website, define the goal type as track page visits and enter the page URL users need to visit, to record the conversion.
URL Patterns in VWO
VWO supports the following patterns to specify the URLs for the page(s) you want to test:
- URL Matches
If you wish to match the exact URL of the webpage where you want to record goal conversions, choose the URL matches option. Use this option to set up a test on a single URL and it searches for a character-to-character match of the URL you enter.
For example, say you want to record a goal conversion on the URL http://www.example-site.com/checkout.html. The goal will get triggered only if the visitor lands on this specific page. However, if the user had entered the goal URL as http://www.example-site.com/checkout.html/?id=1234, then also the goal will get triggered as query parameters are matched by default.
- URL Matches Pattern
If you wish to record the goal conversion on more than one page of your website, choose the URL matches pattern option. For this URL type, define a URL pattern by substituting variable parts of the URL with the wildcard * (an asterisk).
For example, you can use the pattern http://www.example.com/products* to record goal conversion on all product pages of your website. Likewise, you can use the pattern http://www.example.com* to track conversions on the entire website.NOTE: For dynamic URLs, there can be instances when the URL of a page differs from visitor to visitor. For example, say the ‘thank you’ page on your website has a URL like www.example.com/thankyou/1123/summary or www.example.com/thankyou/4567/summary. For dynamic URLs, the numeric part in the URL can differ from user to user. In such cases, you can use the asterisk value www.example.com/thankyou/*/summary to track conversions on all the URLs that match the pattern.
- URL Contains
This URL type looks for any string or substring match in the goal page URL. If you select URL contains as the URL match type, the test page must contain the string of the substring you specified.
For example, if you specify the URL contains type as http://www.example.com/blog, VWO will track conversions for the URLs http://www.example.com/blog/January, http://www.example.com/blog/February, and so on.NOTE: If you are using the URL type as URL Starts With or URL contains, remove the trailing slash at the end of the specified URL. Say you are tracking the goal as URL Starts With / URL Contains https://vwo.com/knowledge/. With the slash (/) at the end of the URL, conversions are tracked only for URLs with something after the trailing slash, such as https://vwo.com/knowledge/abc.html. Therefore, to track the goal on https://vwo.com/knowledge/, specify the goal URL as URL Starts With/URL Contains and then type https://vwo.com/knowledge without the slash at the end.
- URL Starts With
The URL starts with option lets you match all those strings that match the beginning of your goal page URL. The URL you type here must match the characters at the beginning of your goal page URL.
For example, say you want to record goal conversion on the URL http://www.example.com/checkout.cgi?page=1&id=1234567. In this case, the id varies for every other user. You can match this page by using http://www.example.com/checkout.cgi?page=1 as the goal URL and then selecting the URL starts with option. Here, VWO will track conversion on all pages starting with http://www.example.com/checkout.cgi?page=1, regardless of the user ID at the end of the URL.
- URL Ends With
The URL ends with option that lets you match all those strings that match the ending of your goal page URL. The string you enter here must match the characters at the end of your test page URL.
NOTE: In case there are certain query parameters in the URL, they will not be considered in the URL ends with case. For example, say you want to record goal conversion on the checkout page of your shopping cart that ends with /checkout.html. Your visitors may be landing on the checkout page from various sources. In such a scenario, you can specify the URL as /checkout.html and then select URL ends with as the URL type. Here, VWO records conversion on all pages that end with /checkout.html.
- URL Matches Regex
The URL matches regex option allows you to use wildcards and special characters to match the URL of your website under test. Using Regular Expressions (Regex), you can specify a set of pages on which the test should run. To learn more about regex, click here.
For example, your website has five pages (page 1, page2,..., page5), and you wish to run the test only on page1 and page2. In such a scenario, you can use the URL matches regex option as http:\/\/shoes.example.com\/checkout.cgi\/page(1|2) to match the page URL.