How to remove Facebook JS from our store?

Solved
cmscss
Shopify Partner
176 2 185

Hey Guys,

How do you stop Facebook JS files from loading? I've tried:

  • Disconnecting the 'Facebook Shop' sales channel
  • Removing the Pixel from Themes > Preferences > Marketing
  • Uninstalling the Facebook app
  • Checking Google Tag Manager for Facebook tags
  • Using Theme Kit to pull the theme locally & searching for 'Facebook' & 'v=2.9.24' & fbevents.js etc
  • Removing all cookies and data associated with our site in Chrome, incase it was distorting the test
  • Waiting several hours after the changes incase Shopify's caching system needed time to update

But despite doing all of the above, we still have multiple Facebook files loading (one is huge):

If JS isn't being loaded from theme files, where on earth do they load from?

Any help would be much appreciated.

Cheers

Ben

 

0 Likes
oreoorbitz
Shopify Partner
132 14 78

Fb files are loaded by content_for_header

 

Use capture and a filter to remove them 

https://community.shopify.com/c/Shopify-Discussion/Benefits-of-content-for-header/m-p/863692#M192756

Available for freelance. I specialize in speed improvement and theme development.
https://www.upwork.com/fl/orionholmes
cmscss
Shopify Partner
176 2 185

So just confirming that Shopify loads this stuff automatically by default - for everyone?

Or is it because uninstalling Facebook apps doesn't also remove calls to associated JS files?

0 Likes
oreoorbitz
Shopify Partner
132 14 78

This is an accepted solution.

Honestly Im not sure, I don't think it's loaded by default. It's probably loaded by an app. But it's pretty hard to trace which app. I read a similar topic on the forums, Somone mentioned an app called Kit.

For things loaded in content for header, there should be a data-loadedBy tag so we know what app is generating what. 

Available for freelance. I specialize in speed improvement and theme development.
https://www.upwork.com/fl/orionholmes
cmscss
Shopify Partner
176 2 185

Removing the Kit app removed the FB JS and page load is noticeably faster on mobile - thank you.

0 Likes
Dams-Care
Tourist
15 0 1

Hi

I don't have kit installed but i've the same problem. What's strange is that when i comment "content for header" the facebook and google analytics scripts still appears. Seems like they're loaded automaticaly by shopify.. I've contact support which say they have remove the connexion on their side and that it might take more than 20 days to take effect... WTF ?! Are they joking ?!!

Any help would be welcome.

0 Likes

@Dams-Care A similar situation to the one your describing happened to us, we removed the facebook and google channels and cleared cache and the requests disappeared. I don't mind having a look at your site to try and find where these requests originate from. What's your stores url?

Best,

eStoreSpeedOptimization

Subscribe to Shopify speed improvement newsletter (we never spam)
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
0 Likes
Dams-Care
Tourist
15 0 1
Hi,Thanks for your reply and offer. https://cervi-care.com
0 Likes
Cosmin_H
New Member
2 0 0

Is there a solution for this issue?

I've removed all the FB features from Shopify but google still shows requests like: https://connect.facebook.net/signals/config/...

 

0 Likes
wingnutz
Tourist
6 0 1

With great pleasure, we got rid of facebook from our store two months ago as they were slowing down the store and producing no value for us.

Remember to remove the advertising pixel and remove any code within liquid that relates to facebook.

- m

0 Likes