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.
NOTE: The custom conversion code is unique to each custom goal you define
for a test.
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.
NOTE: Click the ADVANCED tab next to the URL field to include or
exclude URLs from the goal tracking. Using this tab, you can also
define advanced pattern-matching options to include either a broad
URL with wildcard entries or a specific URL. To learn about using
different URL types for a goal, refer to Using URL Patterns in VWO.
- 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 FINISH.
- 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.
- 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.
- In 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 URL 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. This field appears based on what you have selected in the Goal Type dropdown.
- Click NEXT to complete the remaining test configurations.
- On the click of FINISH, a custom conversion code snippet appears at the bottom of the page under the Conversion goal code snippet section. The code snippet looks like:
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 your Smartcode and configure as to when the custom goal starts 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.
Best Practice While Configuring Custom Conversion Goals
We recommend you to always use the queue functionality to ensure that your custom conversion goal gets fired after VWO Smartcode. The following snippet is an example of how to use the queue functionality: