How to Install the Main Tag / Code / Javascript

Understand Installing the main JS Code

The main tag needs to be installed in the head section of the page, before any other loaded resource. So, after the <title> tag, is best.

It’s not an absolute requirement to install the code just after the <title> tag, but doing it this way ensures the best performance. The reason for this is that the Convert Experiments tracking request needs to be initiated as soon as possible on the page, giving it time to get the results back before the whole page finishes loading.

Therefore, tests work even if the code is installed in the footer of the webpage. However, since the tracking request will be started just before the page has loaded, the variation changes arrive later in the browser and therefore the time that passes until the variation is visible will be longer, this can result in a visual blinking of the variation..

Where to Find your Convert JS Code for your Project

The variation code can be found on the Project Settings. To get to it, select your Project, on the Project Panel.

Then select the Settings of your project on the left hand bar of the project that you are working on.

 Then go to the lower section and click on the "<>" button on the section pointed below.

 

 The copy and paste the code shown below, and place it on your website as told in the previous section.

Regarding Google Analytics integration: If you are planning to send your variation data to Google Analytics, make sure that the Convert tracking code is installed after the Google Analytics tracking code. Otherwise, you won't have your variation data available in Google Analytics. Please read more at http://support.convert.com/hc/en-us/articles/205160075-Integrate-Convert-Experiments-with-Google-Analytics

 

Have more questions? Submit a request

Comments