Skip to main content

Step 2 — The JavaScript enhancement (optional)

<script type="module" src="https://saz-es.public.shopadvizor.com/saz-ssr-server/v1/hydrate.js"></script>

Load it once per page, before </body>. This is the same URL as Step 1, whether Shopadvizor serves it directly or behind a CDN on their side: saz-es.public.shopadvizor.com/saz-ssr-server.

Do not copy the file onto your own CDN

The bundle has to stay in step with the fragment the service renders, and the versioned /v1/ path is what guarantees that. A self-hosted copy stops matching the first time the service is upgraded, and nothing warns you when it does.

It is genuinely optional: without it the widget is fully functional and fully indexable. It does not re-fetch data (the data is already embedded in the fragment) and it does not repaint, so there is no flicker.

It is about 15 KB gzipped. Without it you lose nothing visible: the ratings widget is complete without it.

The one case where it is not optional

If your page inserts the fragment with JavaScript — for example a Next.js app navigating between pages — load hydrate.js: without it your visitors see a blank widget after those navigations. Indexing is not affected: a crawler loads each page from your server, with the widget in it. See the Next.js note in Step 1.