Using VWO capabilities, you can create goals to track custom conversions. For example, if your goal is to track when someone hovers on an element, you can create a custom conversion goal to trigger on the hover event.
When you create a custom conversion goal, VWO generates a code snippet that you can add to your test pages to track conversions. You can place the code snippet below your SmartCode and configure the tracking criteria as required. A custom conversion goal is defined typically to track goals that are not directly related to clicks or URLs.
In VWO, you can configure custom conversion goals in the following two ways:
VWO Insights Goals
These are typically the business goals that are not part of a test but actively runs on your websites in an always-on manner. For example, you may only want to check how the Subscribe Now CTA is performing, without having to create the entire test. You can configure these goals from the INSIGHTS > Goals section of the VWO app. To know more about the VWO Insights goals, refer to Types of Conversion Goals in VWO Insights. Let’s have a look at how to configure a custom conversion goal in VWO Insights.
- Login to your VWO account.
- Go to INSIGHTS > Goals or you can select any other testing type per your requirements.
The goals dashboard appears.
- From the Select goal to track dropdown, select Track Custom Conversion.
- In the Enter URL of the page where you want to track custom conversion field, enter the URL of the page to track any custom events such as clicks or AJAX request completion.
- Click NEXT to define the audience of your conversion goal.
- In the Enter URL of the page you want to define as audience field, enter the webpage URL which you would want to define as the audience.
- To add notes and labels, use the Add Notes and Add Labels options.
NOTE: Adding notes and labels help you filter the goals during a search.
- To finalize the goal setup, click CREATE.
- Once your goal is successfully saved, you can immediately start running the goal on the specified pages or choose to start it at a later time.
NOTE: The concept of sampling is applicable to the VWO Insights Goals. To know about sampling in VWO, refer to How VWO Sampling Works.
VWO Testing Goals
These goals are the ones that you create for a test and are specific to the experiment you are running. For example, you may be creating an A/B test to check if any change in the color and size of the Check Out button records more conversions. You can configure these goals on the GOALS step of your test creation. To know more about the VWO Testing goals, refer to Types of Conversion Goals in VWO Testing. Let’s have a look at how to configure a custom conversion goal in VWO Testing.
- Login to your VWO account.
- Go to Testing > A/B or you can select any other testing type per your requirements.
A/B Testing dashboard appears.
- In the dashboard, click CREATE.
- In the Enter URL of the page you want to test field, enter the URL of the webpage you want to test.
NOTE: To include or exclude URLs from the campaign, click the ADVANCED tab present next to the URL field. Using this tab, you can also define advanced pattern-matching options to either
include a broad URL with wildcard entries or a specific URL. To learn about using different URL patterns, refer to Using URL Patterns in VWO.INFO: In the case of specifying a URL pattern for the campaign, where you wish to exclude a given webpage that matches the pattern criteria, the Exclude URL option comes in handy.
For example: Let’s say you wish to run a site-wide test on https://vwo.com, but you want to exclude the Contact Us page (https://vwo.com/contact-us/) from it. Then, you need to mention the URLs in the respective fields as follows:
Included URLs: https://vwo.com*
Excluded URLs: https://vwo.com/contact-us/
- From the What hypothesis are you testing? dropdown, select a hypothesis you want to work with. This is an optional step.
NOTE: If you do not have a hypothesis yet or wish to create a new one, you can do so by clicking on the Create a New Hypothesis option present at the bottom of the hypothesis dropdown. To learn more about the hypothesis, refer to Hypothesis in VWO.
- In the Variations page, create your variation and click Next.
- On the Goals page, click the edit icon present next to the New Goal and enter the name for your goal.
- From the Goals Type dropdown, select the option tracks custom conversion on.
- In the Included URLs field, specify the operation from the dropdown, and in the field next to it, enter the URL of the webpage where you want to track the conversions. If you wish to exclude a webpage from the goal conversion tracking, use the Exclude URL option to specify the operation and the URL of that page.
- Click NEXT to complete the remaining test configurations.
- On the click of CREATE, a custom conversion code snippet appears in the Goal URLs section. The code snippet looks like:
If you create a custom conversion goal from scratch, the _vis_opt_goal_conversion(your_goal_ID) variable appears in your goal code snippet. However, if an existing goal is converted to a custom conversion goal, the _vis_opt_register_conversion(your_goal_ID, your_campaign_ID) variable appears instead of _vis_opt_goal_conversion(your_goal_ID).NOTE: In a campaign, the custom conversion code is unique to each custom goal you define for a test.
To make your custom conversion goal work, you must add the generated code snippet below the VWO SmartCode and configure as to when the custom goal should start tracking. The tracking can be on a button click, link click, the success of Ajax request, and so on. For example, to trigger a custom conversion goal bound to a click event of an anchor tag, specify the code as follows:
In this example, the code snippet is bound to the on-click event of the anchor tag. The anchor tag must be clicked first to fire the conversion.