Skip to main content
All CollectionsFor WebBuildAdvanced Editor
Pre and Post Rendering Scripts
Pre and Post Rendering Scripts
Updated over 10 months ago

Within Advanced Editor you have the ability to add Javascript to any project.

Here is an example of using the Script section to add a page load conversion

Adding a Page Load Conversion using custom codePost-Rendering Script:

  • During the test set up process, you can add page load conversions in step 3 “SCRIPTS” – This step is only accessible by following through each of the previous steps. Add your custom code to the Post-Rendering script box

  • Add the following custom code into the ‘Post-Rendering Script’ window:

WT.addEventHandler(‘pageview’, function(e)

{

If(window.location.href.match(/www.yoursite.com/)) {

WT.click( {conversionPoint: conversionName});

}

});

  • Replace /www.yoursite.com/ with the URL page(s) in RegEx format.

  • Replace conversionName with a meaningful conversion name (E.g. Page_Confirmation).

    • We recommend using the “Page” prefix and avoid using spaces, apostrophes or special characters where possible.

  • Click “Audience” to save and proceed to the next step of the test set up.

Did this answer your question?