After consulting our dev team, we confirmed that VWO does not provide page-specific smart codes. To restrict the script to certain pages instead of implementing it sitewide, a conditional approach can be used during implementation.

 

If the website uses a shared header or layout file, you can wrap the VWO script in an if condition to load it only on specific pages.

 

For example (in PHP or server-side template):

<?php if ($_SERVER[‘REQUEST_URI’] == ‘/target-landing-page’) { ?>

<!– VWO SmartCode –>

<script type=’text/javascript’>(function(){/* VWO script here */})();</script>

<?php } ?>

 

The above is just an example for condition, something like this can be used for adding the script on specific pages.

 

The VWO smart code also needs to be added to the top of the <head> section to eliminate the flicker issue.