Elfsight review is blocking the main thread

  • Issue description:
    Hi, I run the Google Pagespeed Insight for my website. And I notice that the script for google review is blocking the main thread (that’s what it says). Can someone help me to improve this ?

Here is the pagespeed page : https://pagespeed.web.dev/analysis/https-phoenixtattoostudio-fr/e0vdmto6cr?hl=en&form_factor=mobile

Thank you

Greetings @user3507 and welcome to Elfsight Community :heart_hands:

I’m so 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:

<script src="https://apps.elfsight.com/p/platform.js" defer></script>
<div class="elfsight-app-WIDGET_ID" data-elfsight-app-lazy="first-activity"></div>

Please replace WIDGET_ID in the code above with the ID of your own widget and install it on your website.

Just in case, here is the post, where you’ll find more details about lazy loading feature.

Please follow these steps and let me know if it worked :slightly_smiling_face:

Hi Max,
Thank you so much for your respond. It works perfectly and my performance score juste double from 31/100 to 62/100. My website load so much faster.
Do you know why it does that ? Because elfsight blocked from 4200ms to 5200ms each time I do the speedtest

1 Like

Glad to know that you are good now :wink:

I have to tell you that our widgets are full-powered website apps, albeit being placed in a very small container. Although we’re working at improving these metrics, at the moment our widgets do take some of the site’s resources, which may affect its performance.

I’m having the same problem with another script from another company, and apparently they don’t have the lazyload feature implemented like you guys do. It sucks.
You guys are doing great keep up the work bro !!!

@user3507 Gotcha, I see how annoying it can be.

Many thanks for your kind words, mate. Your support is one of the most crucial things for us :heart:

If anything comes up, I am always happy to see you here.

Have a great weekend :wink: