1. Widgets
WiserReview
  • Introduction
  • API Refrences
    • Authentication
      • Generate Token
    • Reviews
      • Get review list
      • Get reviews by product
      • Create review
    • Widgets
      • Star rating
      • Product Review
  • Guides
    • Widgets
      • Plugins
      • Custom site
    • Webhooks
      • Introduction
    • Rich Snippet
      • Product Rich Snippet
  1. Widgets

Custom site

You need to install script code for each widget

Get widgets code/snippets for custom site#

Create account and go to widgets and get installation code for each widget. check this step by step doc toget widget code. Support document guide

Setup snippets in SPA Sites#

In a regular website, the page reloads on every navigation. Because of that, the WiserReview pixel runs again and reviews render automatically.
In a single-page app (SPA), pages change without a full reload. The WiserReview script loads only once, so widgets do not refresh on page change by default.
To handle this, WiserReview must be re-initialized after every route change.

When to Call Init#

Call window.wiserreview.init() only after:
The route change is complete
The DOM is updated
The product ID is ready
This allows WiserReview to fetch new product data and render widgets in the WiserReview container.

SPA Setup Flow#

1.
Load the WiserReview pixel once
2.
Detect route change
3.
Wait for DOM update
4.
Call window.wiserreview.init()

Support for NextJS#

Support for React (CRA / Vite)#

Support for Angular#

Support for Vue.js#

Support for Svelte#

Modified at 2026-03-13 12:28:13
Previous
Plugins
Next
Introduction
Built with