We have created a widget for Google review and implemented it on our webpage. We have checked the page speed insights from Google and found that platform.js is getting deferred but it is calling GoolgeReviews.js which is not deferred and blocking the main thread. This is decreasing the SEO score and reducing the page load speed.
Can you please check why GoogleReviews.js is not getting deferred?
We have implemented this on one webpage only as of now. Please find below the webpage:
The Review js is blocking our main thread. The platform js seems to be working as deferred, but not the Review js. We will need this issue resolved for all our widgets and we can implement after that only.
I’m really sorry that our widget affects your website’s PageSpeed score. However, the good news is that we have a way of improving the performance.
You are very welcome to reinstall your widget by using some kind of lazy loading.
To make it work, you need to:
Add a data-elfsight-app-lazy attribute to the widget installation code. Here’s what the installation code will look like [Changing WIDGET_ID to actual one required] :
Move the widget installation code given above lower on the page . At the moment the code is added to the header, I recommend you to place it in the footer of the page.
Keep in mind that after installing the widget with the attribute, for the widget to appear on the page, the visitor will need to interact with the page, at least move the cursor.