Can I safely remove socialhead widget to speed up store

medlingtonQPS
Tourist
7 0 1

Hi,

Our site is really slow and Im trying to speed it up. 

Pagespeed insights is flagging lots of javascript files as slowing it down.

One thats bugging me is something called socialhead and it has 2 entries at the bottom of my source code, 1 CSS and 1 Js:

 

<script src=https://static-socialhead.cdnhub.co/social-widget/social-widget.min.js?v=2.1 defer></script>
<link rel="stylesheet" href=https://static-socialhead.cdnhub.co/social-widget/social-widget.min.css?v=2.1 />


Does anyone know what this actually does? There is a box with a few social media icons in which I can recreate easily enough without a plugin and wouldnt really care if these went completly either so if this is all that it creates then I can remove it. I had a look at the app and it seems to be suggesting that it may control the product feeds to Google and Facebook too inwhich case I probably need to keep it.

 

0 Likes
tom_phillips
Shopify Partner
10 2 1

Can you share a link to your store?

0 Likes
medlingtonQPS
Tourist
7 0 1

Sure:

https://www.quickplaysport.com/

The links are included right at the bottom of the code, but they still get flagged in Lighthouse.

Thanks

0 Likes
JoesIdeas
Shopify Expert
1402 124 373

@medlingtonQPS that's normal, if you're using an app it needs to load code to function (it's better if the code is on your servers, rather than pinging theirs, but that's not always feasible).

I would contact the app developers.

If you aren't using it, you can safely remove it.

If you are using it, you could ask where it's needed, then conditionally load it only on those pages. For example, if you only need a functionality on the product page, you could only load that on the product page, either by moving the scripts to the product page, or if they're in your theme.liquid, use liquid to conditionally load them:

{% if template == "product" %}
  any code you put here will only load on the product page
{% endif %}

 

PageSpeed Insights will flag a lot, it's not geared for ecommerce sites so does not care about your apps that help you add engagement and make sales.

Founder of Speed Boostr (Shopify optimization experts, theme customization, custom app development).
Creator of Shopify Analyzer (first performance analysis tool for Shopify sites, free for the Shopify community).
Creator of Order Automator (auto tag orders and customers + auto fulfillment + more automations).
More apps: Theme Scientist (A/B testing), Tip Jar (add a tip button), File Optimizer (optimize CSS, JS, Liquid).
0 Likes