# LinkedIn and Facebook

**URL:** <https://community.hubspot.com/t/linkedin-and-facebook/55290>\
**Category:** CMS Development\
**Created:** [April 20, 2022, 10:45am UTC](https://community.hubspot.com/t/linkedin-and-facebook/55290 "2022-04-20T10:45:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LBernardo86](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@LBernardo86](https://community.hubspot.com/u/LBernardo86)\
**Post date:** [April 20, 2022, 10:45am UTC](https://community.hubspot.com/t/linkedin-and-facebook/55290/1 "2022-04-20T10:45:17Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [April 25, 2022, 2:47pm UTC](https://community.hubspot.com/t/linkedin-and-facebook/55290/2 "2022-04-25T14:47:58Z")

</div>

@piersg ,

How do you combat this typically?

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [April 26, 2022, 10:49am UTC](https://community.hubspot.com/t/linkedin-and-facebook/55290/3 "2022-04-26T10:49:07Z")

</div>

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

```lia-code-sample
window.addEventListener('load', function(e){
 // tracking script
});

```

---

<div class="post-metadata">

**Author:** ![LBernardo86](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@LBernardo86](https://community.hubspot.com/u/LBernardo86)\
**Post date:** [April 27, 2022, 5:50am UTC](https://community.hubspot.com/t/linkedin-and-facebook/55290/4 "2022-04-27T05:50:52Z")

</div>

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