About Convertize

Installing Convertize

With Website Builder

With Tag Manager

Manually

Using Convertize

Managing Experiments

Targeting & Tracking

SmartPlugins

Advanced Use

Your Results

Technical Info

Billing

A/B Testing Agency

FAQ

How to add a script to the head of a variation

A lot of SAAS apps require you to add a Javascript file to the head of you website. In some cases, you may want to add this file to a specific variation only. In this situation, you will need to dynamically add the file to the variation using Javascript.

You can do this by adding the code below to the Javascript box for your variation:

var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://www.example.com/script.js";

document.head.appendChild(script);

Make sure you replace https://www.example.com/script.js with the link to your external file.

About Convertize

Installing Convertize

With Website Builder

With Tag Manager

Manually

Using Convertize

Managing Experiments

Targeting & Tracking

SmartPlugins

Advanced Use

Your Results

Technical Info

Billing

A/B Testing Agency

FAQ