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 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 and select a test type per your requirements.
- In the dashboard, click Create and go to Configuration > Goals.
- By default, your goal is named as Goal 1. You can rename it by clicking on the edit icon present next to the goal name.
- From the Goal 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.
- Click Create. A custom conversion code snippet appears below. 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 when the custom goal should start tracking. The tracking can be on a button click, link clicks, the success of an 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.