Can I safely remove socialhead widget to speed up store

medlingtonQPS
Shopify Partner
27 0 8

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.

 

Replies 3 (3)

tom_phillips
Shopify Partner
12 2 1

Can you share a link to your store?

medlingtonQPS
Shopify Partner
27 0 8

Sure:

https://www.quickplaysport.com/

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

Thanks

JoesIdeas
Shopify Expert
2195 201 587

@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.

• Creator of Order Automator (automate tagging, fulfillment, Amazon, notifications + more)
• Shopify developer for 10+ years, store owner for 7 years
• I also make guides like Shopify Automation Tips and How to Deal with Fraud / Chargebacks