THIS ARTICLE WILL HELP YOU:
Introduction
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, 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 the page. In the Size column, you will see the size of everything loaded (Documents, Stylesheets, Images, Scripts, ...). You can enable the filter to help you find out only needed stuff at the bottom-center of the 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 first-page view to the web pages where it is installed. Subsequent loads should be cached either at browser level or at CDN edge level.
Reduce your goals
Reduce the number of goals being used to the minimum needed. All attached goals to your experiments add code to your snippet. Keeping this reduced to the minimum will help.
Clean your variation code
Clean and maintain your variation code in the "Code Editor" area of your experiences to the minimum. An experiment variation code should always be kept under watch. So, there are no repeated lines, and there is no code that does not add any value. This is something common to look for when using the Visual Editor. So, whenever the Visual Editor is used, someone should revise the code produced, if you want to keep it clean and to the minimum. At the end of the day, is code that runs on the page, and you should be concerned and invest in its performance, by having someone technical verify that is reduced to the minimum to prevent increased load times.
tag: page speed, performance