I'm looking at Page Speed Insights and GT Metrix. The top thing that's causing our site to run slow is JS from Facebook. Is there any way to improve this JS from FB without messing stuff up?
Hi @GoBlue ,
If you are talking about a share button or feed, then you should remove them. or you can simply replace share buttons with non-js buttons.
I would think you talking about JS tracking code that fb pixel uses.
Ideally you can remove this code but that will mean you will not get data insights on facebook.
so there is not such solution as off now for this.
You can make other improvement to your store for speed optimization.
You can use https://websitespeedy.com to implement lazy loading and fix render blcoking issues which will improve the speed and gtmatrix score for you.
I am Gina from flareAI app helping Shopify merchants get $6Million+ in sales from Google Search, on autopilot. I am here to support you.
There are a few things you can do to improve the performance of JS from Facebook on your Shopify store.
Asynchronous loading of JS from Facebook ensures that it doesn't block other elements from loading. This will reduce the load time of your website. You can use the "async" attribute in your code to load Facebook JS asynchronously.
3. If Facebook Pixel is taking time to load, delay the snippet’s execution until after the page has loaded by wrapping our script with the following code
/* Facebook Pixel Code */
4. Remove unnecessary Facebook scripts
If you have multiple Facebook scripts running on your website, consider removing the ones that are not essential. This will reduce the number of requests made to Facebook servers, thereby improving your website's load time.
By applying these steps, you can enhance the speed and functionality of your Shopify store while maintaining the necessary features of JS from Facebook.
Let me know if you have any further questions.
You need to focus on the following things:
Double Loaded Scripts, Due to App
Apps when installed may inject a few files into your Shopify theme. When removing unnecessary apps, you should also remove Shopify app files from your theme that were added. third-party code can Significantly impact load performance.
Make the shift from discounts to donations, and witness your business not only thrive fina...By Holly Dec 4, 2023
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...By Arno Nov 27, 2023
You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...By Skye Nov 8, 2023