Iframe
Add a hosted survey to your site with an iframe or link — no SDK needed.
- Last reviewed
Iframe
An iframe is the fastest way to get a survey into your product when you don't need runtime control. No SDK, no build step — just a URL.
1. Add the iframe
Paste this into your page with your API key and survey ID:
<iframe
src="https://getuserfeedback.com/embed/YOUR_API_KEY/SURVEY_ID"
title="Survey"
width="100%"
height="400"
></iframe>
Or use it as a direct link:
https://getuserfeedback.com/embed/YOUR_API_KEY/SURVEY_ID
Grab your API key from Settings → Widget in the getuserfeedback.com dashboard.
2. Identify your users
When you identify users, getuserfeedback.com can target the right people and tie responses to real profiles. Pass user identity as query parameters:
| Parameter | Description |
|---|---|
user_id | Your stable user identifier. |
anonymous_id | Session or pre-login identifier. |
email | User email (maps to traits.email). |
phone | User phone (maps to traits.phone). |
advertising_id | Device advertising ID. |
device_id | Device ID. |
device_token | Device token (e.g. push). |
Example:
/embed/YOUR_API_KEY/SURVEY_ID?user_id=user_123&email=user%40example.com
You can combine multiple identifiers in one URL. This helps getuserfeedback.com connect the dots when the same person shows up across different channels or devices. See Personalization for more.
You don't have to identify users — surveys work fine without it.
You're live
That's it. The survey is loading and collecting responses.
Dark mode
Append a color scheme to the URL path to control the initial render:
/embed/YOUR_API_KEY/SURVEY_ID/light— light theme (default)/embed/YOUR_API_KEY/SURVEY_ID/dark— dark theme, server-rendered/embed/YOUR_API_KEY/SURVEY_ID/system— follow visitor's system preference
Each request is stateless — theme and user identity come from the URL you send on that load. See Dark mode for how color scheme detection works across all integration methods.
Tips
- Treat the iframe URL as configuration, not content. Build it from your app key, survey ID, color scheme, and user identity.
- Use the path-based color scheme (
/dark) instead of the legacy query parameter (?color_scheme=dark). - If your security perimeter requires JWT auth, read User authentication before rollout.
Going further
- Personalization — targeting, personalization, and behavioral segmentation
- Dark mode — intelligent color scheme detection