Google PageSpeed score is being negatively affected by HubSpot network requests

Highlighted
New Contributor

Our Google PageSpeed score is being negatively affected by hubspot network requests.

Though these scripts are being loaded defered and async, they still are calculated into the overall page load times for Google's metric. 

1.) Can anything be done to lighten these, or at least follow the guidelines Google is asking for for a better user experience?

 

hs-scripts.JPG

2.) Can you put a cache policy onto the below static assets? Google suggests "Cache-Control: max-age=31536000".  If you need to update these resources, why not use a url revision query?

serve-static-assets-with-cache-policy.JPG

3.) If your chatbot needs to download 6 fonts, at least use the font-display css value of "swap" so that it can use a system font until the fonts are fully loaded.

text-remains-visible-during-load.JPG

4.) It's time to get jQuery removed as a dependency. It's used for the chatbot, and the forms embed script callbacks as it relates to our site. It's added weight we don't need - modern websites and apps are not using it anymore in favor of what javascript can do natively now.  

5.) Can you remove the default styling in the forms embed that is injected into the head of the document?  If I am selecting "Unstyled Form", that's what I should actually get so I can style the forms in my own stylesheet.  This small change would allow me not to have to go to the troulble of rebuilding all my forms using the Forms API.

6.) Because of the chatbot specifically, our site's Mobile pagespeed score is "Slow".  There isn't a way to disable it for mobile, only a hack of using css to hide it which doesn't solve anything - still requests all the above offending resources.

Making these changes or suggesting solutions that work would be a step to helping out those of us concerned with site optimization as it pertains to SEO and overall performance for our users/customers.

Supporting backward compatibility for old browsers and/or hubspot users' legacy code is understandable but those of us utilizing current web standards shouldn't have to suffer. HubSpot is an expensive product to not be at the top of it's game when it comes to these concerns.


Thank you

5 Replies 5
Community Manager

Hi @nstoffel,


I wanted to direct you to this thread where I recently shared information and resources around page speed and HubSpot.

 

I especially want to highlight this resource which discusses HubSpot and site speed in great detail. 

 

Thank you,
Jenny


Did my post help answer your query? Help the Community by marking it as a solution
Reply
0 Upvotes
New Contributor

Thanks but i've already used those methods to optimize my site.

 

I guess I will have to reach out to support directly to try and get any answers.

Reply
0 Upvotes
Regular Contributor

you have to optimize your website errors and issue which are highlighted by google page speed score, after that periodically check the speed of your site and make a monthly report.

New Member

We're experiencing this too. It's an issue.

 

Neither of the answers supplied correctly understand the issue the orignal poster is having.

The issue is with the code which Hubspot injects into our websites via its plugins - so it is completely outside of the control of the webmaster to make changes to this.


Would be good to see improvements here - we are seeing dramatic performance decline on some of our sites after installing the chatbot and forms.

New Member
<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js" async></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js" async></script>
<script>
jQuery(window).scroll(function() {
    if (!jQuery('.hbspt-form').length) {
        hbspt.forms.create({
            portalId: "PORT_ID",
            formId: "YOUR_FORM_ID"
        });
    }
});

</script>

Use this. Basically we are adding to both async attribute scripts above. And load form on the scroll when the user scroll. You may need to change some logic according to your need. Let me know if I can help you with something. 

Reply
0 Upvotes