Reporting & Analytics

VGupta
Member

Need to unlist HS scripts from "Remove Unused Javascript".

We are trying to fix LCP on our website. But google suggests us to remove unused javascript. 

 

VGupta_1-1629893470050.png

 

 

We tried different methods but none seems to be working along. Can someone suggest us some way

3 Replies 3
webdew
Guide | Diamond Partner
Guide | Diamond Partner

Need to unlist HS scripts from "Remove Unused Javascript".

@VGupta , 

So the first thing I'd like to tackle is the Page Speed Insights question. Here is an article on why Google Pagespeed Insights is useful but is not something we work towards appeasing. If you would like some good information, I could suggest this section here. It goes into detail about the reasons those tools are limited.

 

Here's another on how our Devs increased page speed.

 

As for the Form submissions question. That's an interesting one. I know we can create Forms via API 

 

What I'm curious about however, is that the Submit Form Data Endpoint is in the Legacy Documents for the API, but I can't seem to see it in the most recent documents.

 

Actually that's okay because the legacy version is the most stable version. So, yes I think this might be possible in theory. What I can suggest is that you can submit forms via API.  

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards. 

VGupta
Member

Need to unlist HS scripts from "Remove Unused Javascript".

Can we create form on our end and on submit event we can send details to hubspot using api ?

0 Upvotes
webdew
Guide | Diamond Partner
Guide | Diamond Partner

Need to unlist HS scripts from "Remove Unused Javascript".

Hi @VGupta ,

Based on the screenshot, I'm seeing the forms showing as an unused Javascript, but if we do want to load forms on the page this would be a necessary script to include. 

 

It looks like the Google recommendation is referring to reducing Javascript because any extra assets that need to load on a page does take extra time and so it can impact page load speed.

 

As I mentioned earlier, we would not recommend removing any form scripts from HubSpot forms because this is required for the form to function. In this case, the main recommendation I can give is for your work with your developer to check through the scripts currently loading on the page and remove any that are not necessary.

 

If you do find all the script is necessary, we would recommend leaving the script in because even though it may make the page take slightly longer to load, it is needed for the page functionality. Ultimately, Google will give recommendations based on their bot's programming for how page speed should be but it doesn't really look at the specific user experience.

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards. 

0 Upvotes