To run test on your website, you’ll need to add the Zarget snippet in your site.
We recommend adding the JS snippet to all the page(s) of your website.
Adding the Zarget snippet to your website is a one-time process and your experiments can be run multiple times provided the code is integrated in that webpage.
To install the Zarget JS snippet on your website, follow these simple steps:
Go to the Experiments page, click Setup and select Install Zarget JS code.
Locating Zarget Snippet
Integrate code page opens with the JS code snippet.
Code Integration Page
Zarget provides two options each of which having a basic functional difference in the code execution.
Synchronous code: The scripts are loaded and executed sequentially.
Asynchronous code: The scripts are loaded and executed concurrently. Since the scripts are executed simultaneously, there is a possibility of page flickering from the original page to the variation page. Hence, avoid using asynchronous code for A/B testing and split testing
Click Copy Code button to copy the JS code snippet. Instead, you can choose to send the code to an email id by clicking Send this code to Developer.
Once you have copied the code, you must paste it into the page(s) of your website. Zarget JS snippet must be integrated in the tag of the website’s HTML code.
If the code snippet is placed in the footer tag, the code still works. But the original page appears first and then immediately changes to the variation page(if any), as the Zarget code kicks-in. To avoid such potential problems, we recommend you to add the Zarget JS snippet in the early execution path.
Integrating Zarget Snippet to a website
Once the code is integrated into your webpage, it does not require modifications every time to run various experiments. Multiple tests can be performed with the same code snippet installed in the webpage, from the same Zarget account.
However, If you need to run experiment from a different Zarget user account, the existing code needs to be removed and replaced with the new code generated from the current account.
Zarget allows you to check the integration of the code snippet by providing the URL of the code-integrated page(s).
In the Integrate Code page, enter the URL of your web page in the Verify URL section.
Click on Verify Installation button to check if your integration is successful.
Verifying Code Installation
You can run the necessary test on your website, when the tracking code status is successful.
Visitors’ interactions are tracked even when code installation is not verified.