How Third-Party Scripts Affect Your Shopify Store Performance

22 Sep, 2020

There is no doubt that one of the main culprits for a poorly performing website is the usage of third-party scripts. 

What are third-party scripts?

Third-party scripts are JavaScripts that are created by a third-party provider and/or located on a third-party provider’s servers. One usually embeds them to one’s website as they could be very useful and can serve for various purposes such as showing ads, getting analytics from your site, tracking the behaviour of your visitors, embedding videos and so on. One example is Google Analytics.

How third-party scripts affect my Shopify store performance?

To answer this question is good to have at least a minimum understanding of the concept of ‘critical rendering path’ (CRP). In short, when a user requests from the browser to load a page, e.g. click on a link, the CRP is the steps the browser needs to take before it shows a meaningful content back to the user. We can find a more detailed explanation here. One of these steps is to load and run scripts. While this is being done, the browser has to wait until this process has finished and only then it can continue to perform the other steps and eventually show the content to the user. Therefore if we have many scripts that need to be loaded and they are also heavy, it will take longer for the page to load.

Google’s PageSpeed Insight ( a great tool that gives insight to your website’s performance ) says that for a good user experience the page should load fully within 5s ( for mobile devices )

How is this affecting me and my store?

Here I list three main negative results of slow page speed and generally poor site performance:

1. Loss of customers.

We leave in a world where people expect things to happen fast. And if your website doesn’t meet those expectations, it could result in a loss of customers. As people usually remember bad experiences more than good ones, they will remember the negative experience they had with the site for sure.

2. Loss of revenue.

The above point leads to a potential loss of sales. If people leave the website unhappy because of the bad experience they had, then they most probably won’t return in the future, and this would result in loss of potential revenue now and the future.

3. Negative effect to SEO.

Slower websites (and as a result, slower page speed) does affect your ranking in Google and respectively this also affects your sales.

Therefore it makes sense to invest in researching and figuring out how to improve the page speed and the general performance of your online shop.

So what can be done?

To tackle the issues that are coming from the third-party scripts, I have listed three solutions. A non-techy person could do the first one. The other two might require a developer to help you.

1. Check for installed Apps that are not needed.

Apps from the Shopify Apps Store can be beneficial as they add extra functionality to your shop. However, many of them also come with their scripts and even they use third-party scripts. So review the apps that you are not using (or you could go without) and delete them. Sometimes some apps help you install scripts instead of you doing it manually in the code. If that is the case, delete these kinds of apps and add the code manually.

2. Check for non-crucial third-party scripts.

We have to determine if we need those scripts on our website. Sometimes developers like to make their life easier by adding scripts that help them achieve things faster; however, in the end, the loading speed of the site could suffer. So make sure that you revise the code and remove any non-crucial scripts.

3. Defer the script.

We know that we can’t remove scripts which are crucial for the functionality of our website. What we can do, however, is to defer the loading and execution of the scripts. What this will do is, the browser will wait for the crucial scripts and data to load first, it will show the meaningful content to the user and then it will load and execute the deferred scripts. More detailed explanation about deferred and asynchronous scripts you can read here. You have to keep in mind that this won’t be the best option for every script. There are crucial scripts that have to be loaded first before users can see meaningful content.


In this article, we just looked at one major reason, third-party scripts, that makes the pages load slower. However, there are other reasons for the bad performance of a website in general and slow page speed in particular. Things such as not optimized images, not minified code and some more difficult to tackle cases such as poorly written code and bad website architecture, these all can add up to the poorly performing website.

By Mladen Gorchev

Article photo by Veri Ivanova on Unsplash

With Shopify is easy to run your online shop.

Get free 14 days trial

No credit card required