How to Improve Your Widget’s PageSpeed with Lazy Loading

A fast-loading website creates a better experience for your visitors and can improve your Google PageSpeed score. One simple way to boost performance is by enabling lazy loading for your ReviewsOnMyWebsite widget. This guide explains what lazy loading is, why it matters for site speed, and how to enable it in just a few seconds.

What Is Lazy Loading?

Lazy loading delays the loading of your widget until a visitor scrolls to where it's placed on your website. This means your page loads faster upfront, which helps:

  • Improve your site’s performance on mobile and desktop
  • Boost your Google PageSpeed Insights score
  • Reduce bounce rates and improve user experience

While our widgets are already optimized for speed, any third-party code — including our embed script — can slightly affect metrics like Largest Contentful Paint (LCP) and Total Blocking Time (TBT). Lazy loading helps prevent that by loading the widget only when it becomes visible.

How to Enable Lazy Loading

To enable lazy loading, just add the data-romw-lazy attribute to your widget's <div> tag.

Example Code:

<div data-romw-token="YOUR-WIDGET-TOKEN" data-romw-lazy></div>
<script src="https://reviewsonmywebsite.com/js/v2/embed.js?id=8ed8fd45a2fd062872f56952886c1ec5" type="text/javascript" defer></script>

Important: For lazy loading to work properly, your widget should not be placed in the first visible section (above the fold). Instead, place it further down the page where users need to scroll to it.

Note: If you’re embedding the widget for the first time, you may notice the defer attribute is now included in the script tag by default. This helps improve loading speed by making sure the widget script runs only after the rest of your page has finished loading. If you installed the widget before this change, you can safely add defer to your existing script tag as well.

Why Use Lazy Loading?

  • Faster website load times
  • Better Google PageSpeed and SEO performance
  • Improved user experience, especially on mobile
  • Reduces unnecessary load on initial page rendering

Troubleshooting Tips

  • If your widget doesn’t appear right away, scroll down — it should load once it comes into view.
  • Using multiple widgets? Add the lazy loading attribute to each <div> individually.
  • If your website builder doesn’t let you add this attribute, contact their support or reach out to us and we’ll be happy to help.

Want to Test Your PageSpeed?

Once lazy loading is enabled, you can test your page’s performance using free tools:

Watch for improvements in key metrics like:

  • Largest Contentful Paint (LCP)
  • Total Blocking Time (TBT)
  • Cumulative Layout Shift (CLS)