Wynglet

Rating Widget

Embed an interactive rating widget on any page to collect user feedback. The widget supports both thumbs (πŸ‘/πŸ‘Ž) and star rating (⭐) interfaces.

Overview

The Rating Widget is a lightweight mechanism to monitor the quality of content and collect feedback from your visitors.

Features:

Getting Started

Embed the widget on your page using an <iframe>:

Thumbs UI (Default)

<iframe
  src="https://wynglet.your-server.com/rating/v1?ui=thumbs&url=https://your-site.com/some/page"
  style="border:none; width:200px; height:50px;">
</iframe>

Stars UI

<iframe
  src="https://wynglet.your-server.com/rating/v1?ui=stars&url=https://your-site.com/some/page"
  style="border:none; width:200px; height:50px;">
</iframe>

UI Styles

Thumbs (Default)

Displays a simple πŸ‘ (like) and πŸ‘Ž (dislike) button pair. Best for binary feedback.

<iframe
  src="https://wynglet.your-server.com/rating/v1?ui=thumbs&url=https://your-site.com/some/page"
  style="border:none; width:200px; height:50px;">
</iframe>

Stars

Displays a 1–5 star rating interface. Best for detailed feedback.

<iframe
  src="https://wynglet.your-server.com/rating/v1?ui=stars&url=https://your-site.com/some/page"
  style="border:none; width:200px; height:50px;">
</iframe>

Rate Limiting

To prevent abuse, a single IP is limited to:

These limits help ensure quality feedback while preventing abuse.

Security

Ratings are validated against the authorized domains allowlist. Only ratings from authorized domains are accepted.

Manage your authorized domains in the Dashboard.

Dashboard Integration

Use the Dashboard’s Ratings section to:

The embed builder in the Dashboard makes it easy to copy the correct code for your pages without having to remember the URL format.

Use Cases

Configuration

You can configure rating data retention in your wynglet.yml:

ratings:
  retention: 8760h  # How long to keep rating data (default: 365 days)

Best Practices

Next Steps