Building a Feedback Widget That Works Everywhere: Web, iOS, Android
One widget, six install methods. How we built a cross-platform feedback collector that's embeddable via Script tag, React component, native iOS SDK, Android WebView, iframe, and GTM.
One widget, six install methods
The feedback widget is how most users interact with FeedMission. It needs to work everywhere — on React SPAs, WordPress sites, native iOS apps, and Android apps. We ended up with six install methods, each optimized for its platform.
Script tag: the universal approach
The simplest integration is a <script> tag. Drop it before </body>and the widget loads asynchronously. It creates a floating button that opens a feedback form when clicked. Zero dependencies, works on any website.
The script is hosted on our CDN and loaded with async defer so it never blocks page rendering. Configuration is passed via data-* attributes on the script tag — widget key, theme color, position, button text.
React component: first-class integration
For React apps, we published feedmission-reacton npm. It's a proper React component with TypeScript types, tree-shaking support, and SSR compatibility. You import it, pass your widget key, and it renders the same floating button.
The component accepts 9 customization props: position, theme color, button text, field visibility (name, email), and more. All controlled via React state if needed.
iOS SDK: native SwiftUI
The iOS SDK is a Swift Package that provides a native SwiftUI view. It's not a WebView — it's a real SwiftUI form with proper keyboard handling, haptic feedback, and system colors that respect dark mode.
The SDK checks the monthly feedback limit before showing the widget. If the project has exceeded its plan limit, the widget hides itself and returns a 429 error code that the host app can handle gracefully.
Android: Kotlin WebView wrapper
For Android, we built a Kotlin wrapper around a WebView that loads the widget. It's packaged with Jetpack Compose support, so you can drop it into any Compose layout. The WebView communicates with the host app via a JavaScript interface for callbacks.
iframe and GTM
For sites that can't run JavaScript directly (some CMS platforms, email), we offer an iframe embed. And for marketing teams who manage everything through Google Tag Manager, we provide a GTM custom HTML template.
CORS and security
The widget POST endpoint accepts cross-origin requests from any domain — that's the nature of an embeddable widget. Security comes from the widget key, which is tied to a specific project. Rate limiting via Upstash Redis prevents abuse, and the monthly feedback limit per plan acts as a natural cap.
Try FeedMission for free
Collect feedback, cluster with AI, and ship better products.
Get Started Free