Creating a click conversion using the Advanced Editor

A click conversion counts the number of times a specific html element is clicked E.g. text link, button.

Adding a Click conversion using custom code

Click on the “JS” icon 

On the following screen add your code within the second


In order to track using JavaScript the platform has the function Note syntax, case and that a colon is required after each.

// Format{
   testAlias: value1,
   conversionPoint: value2,
   data: value5

// example{
   testAlias: "ta_123",
   conversionPoint: "Click_CTA",
   data: {
       moduleType: "plp_hero"

// example 2{
   testAlias: "ta_123",
   conversionPoint: "Purchase",
   data: {
       revenue: 123.45,
       units: 3


  • testAlias: The Test Alias is automatically generated when you create a new test and can be found in the ‘Project Details’ section.
    • Replace value1 with your Test Alias name.
  • conversionPoint:
    • This defines the label that will be given to the specific conversion point. Avoid using spaces, apostrophes or special characters where possible.
    • Replace value2 with a meaningful conversion name (E.g. Click_Button)
  • Data: This function defines if custom data is required to be collected as the event is fired.
    • Replace value5 with data if no additional data collection is required.

Example in JS

document.getElementById("YOUR_ID").addEventListener("click", function(){{testAlias: “TA_Mytest”,conversionPoint: “Click_BuyNow”,cookieInspection: false,beacon: false

Example using Jquery.

$("body").on("click", ".YOUR_CLASS", function(){{testAlias: “TA_Mytest”,conversionPoint: “Click_BuyNow”,cookieInspection: false, beacon: false});

Tips and troubleshooting


You may need to check that your element has loaded before hooking events onto it.

On click conversions that take the visitor to new page in the same window, the event may be fired as the visitor is being redirected to another page. This can result in an event not being passed. Adding a small delay to the click event will avoid this being a possibility.

For mobile and touch devices, on.touch rather than for the event trigger will in many cases be more robust.


Adding a Click Conversion using custom code in the post-rendering script:


During the test set up process, you can add Click conversion goals at step 5 “Test Details by adding custom code to the post-rendering script.

Enter your code within the ‘Post-Rendering Script’ section.