Improve Convert's snippet downloading speeds


The snippet is a line of code that you implement on your site to run Convert Experiences. It contains information about your experiments and various account settings.

The snippet contains the Convert JavaScript file, which is downloaded by your visitors' browsers at the very beginning of the page load process. It is static and will be cached in your visitors' browsers after the first request. It's also hosted on Akamai CDN servers. This guarantees that the speed at which the snippet is served is very fast. 

However, sometimes, after Convert has been used for a long time, the Convert snippet size might become big and this might have an impact on the page load as it is downloaded, and it is time to do some house cleaning.

Here are our recommendations on how to improve the script load times.

Size of the Snippet

If you think about what the snippet loads, is the experience conditions (Site Area, Audiences, Goals), and experiment code (Variation Code, Custom CSS, Custom JS). So every time you create one and activate, it loads more overhead to the snippet. 

If you want to see the size of the snippet, you could open Chrome Developer tools on the needed page, switch to the Network tab and reload page. In the Size column you will see the size of everything loaded (Documents, Stylesheets, Images, Scripts, ...). You can enable filter to help you find out only needed stuff at the bottom-center of Developer tools frame.

Search for the tracking code script in the Network tab:

Convert's tracking script will add approximately 450ms extra loading time to the webpages where it is installed on first load. Subsequent loads should be cached either at browser level or at CDN edge level.

Archive Experiments

Archive all experiments that are not in use. All the experiments that are on the following statuses, are downloaded with the snippet:

  1. Active
  2. Paused 
  3. Completed

Move the unused ones to "Archived" status.

FYI, the execution of the variation code included in an experiment will only affect the pages included in the Site Area conditions.

Reduce Goals

Reduce the number of goals being used to the minimum needed. Even if goals are not attached to an experiment will still be downloaded with the snippet.

Clean Variation Code

Clean and maintain your variation code in the "Code Editor" area to the minimum. Remove duplicate lines if present. This is a very common issue when using the visual editor. And this can really bloat the snippet.

Match the order of your variation code and your site code

In Convert Experiences, if the first line of variation code modifies an element at the bottom of the page, the code won't begin to execute until that element loads. So, know what each change is; don't change the footer first, then the header. To make changes as quickly as possible, reorder your variation code such that the elements highest in the HTML structure are changed first, and elements lowest in the HTML structure are changed last.

In addition, if you have many visual changes in your variation code, consider moving them to Experiment Custom CSS area.

Have more questions? Submit a request

Reliably Convert More Site Visitors, Even If Everything Else is Changing in Your Business.

✓ No Credit Card  ✓ Easy Set-Up  ✓ Access All Features