LinkedIn and Facebook

Hi!

I am using the built-in Facebook and LinkedIn integration. They are working fine but the scripts added by these integrations is causing a lot of points to be deducted in Google PageSpeed Insights.
How can I defer them or not cause them to be ‘render-blocking resources’.

Thanks so much!

@piersg ,

How do you combat this typically?

Hi @LBernardo86, you could add the tracking scripts manually to your site header/footer, or to a tag manager like GTM, in a window load event so they always wait for the page to load first. That should/might help

window.addEventListener('load', function(e){
 // tracking script
});

got it! tried this out and the scripts did disappear from the PageSpeed insights ‘errors’