Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
Hi
when I test my website it shows a lot of unused java script from Facebook. Is it because of my Facebook chat plug in that is causing it?
my store: www.minidrago.com
thanks
Hi @DELONG_HUANG,
I understand you would like to know the origin of the requests where facebook appears in url. I had a look at your site www.minidrago.com and some of the requests are from your facebook chat and the others are from the facebook pixel (used to track events). See screenshot below for request breakdown.
I wouldn't used google page speed insights as an indicator of unused requests, mostly i use it to find ways optimize performance for a site. Consider using a tool like webpagetest.org to find unused requests.
Hope it helps!
eStoreSpeedOptimization
As mentioned by @eStoreSpeed, your unused Facebook code is related to chat and your tracking pixel.
Unfortunately, there isn't much that can be done to reduce these warnings since the code is being delivered from a 3rd party source. The only way to remove the unused code warnings for Facebook would be to remove your pixel and chat, which we don't recommend. It's just a trade-off you'll have to make in return for having a better customer experience and improved customer tracking details.
What I mentioned above will apply to just about all unused JavaScript warnings coming from 3rd party sources. Not much can be done as long as the particular app is installed, so it's best to keep your app list to a minimum.
I hope this helps!
As far as I know, there's not much we can do for javascript code from 3rd party (especially for tracking code). I even found Google code show up in Google page speed report for our website.
So if you want to optimize page speed, I'd recommend you check on other tools like this one https://analyze.speedboostr.com/result/fyx23l3lf0 (I've seen another fellow introduce this tool on this forum as well and personally, I think it's useful). The link above is the report of your site.
From the result, you can improve by optimizing images and enable lazy loading:
You can click on each line to see the list of images. We have some recommended free tools for image optimization here if you're interested in
https://pagefly.link/xQKRAfpQ#01_Optimize_image_loading_times (more tips in this guide too)
For Lazy loading, you can implement by using code (you may refer to this https://stackoverflow.com/questions/64016582/how-do-i-add-lazy-loading-to-my-product-page-on-shopify) or using a page builder (no code required).
I work for PageFly - a top trusted page builder on Shopify, so it'd be amazing if you can take a look, we offer free plan for you to try (no time limits) and you can enable lazy loading with a single click.
I hope those information can be useful, if they are, please give me a 'like'
Thank you so much in advance and Have a wonderful day!
PageFly- Advanced Shopify Page Builder - Empowering 100.000+ active merchants.
Check our Evergreen List of Best Platforms To Sell Online.
Or our new series to Build The Perfect Mobile-Friendly Store.