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 do not need SDK-level 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:
<iframesrc="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_IDGrab 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:
https://getuserfeedback.com/embed/YOUR_API_KEY/SURVEY_ID?user_id=user_123&email=user%40example.comYou 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.
Advanced
Attach response metadata
If you want to preserve extra context with each response, add optional
metadata parameters to the URL. Prefix each key with gxrm_:
https://getuserfeedback.com/embed/YOUR_API_KEY/SURVEY_ID?gxrm_journey_stage=onboarding&gxrm_task_type=report-exportMetadata is saved with the response, shown on the response detail page, and included in CSV exports. It does not affect targeting or the survey content. Values are stored as strings, and repeated parameters are stored as string arrays. Keys are normalized before storage, and sensitive-looking values are sanitized automatically. See Response metadata for examples and direct survey links.
Configure runtime
Use runtime configuration when the iframe should open with a specific environment, such as a color scheme or one of your flag variants.
Set the color scheme with scheme:<value>:
https://getuserfeedback.com/embed/YOUR_API_KEY/SURVEY_ID/scheme:systemFor iframe URLs, scheme:light, scheme:dark, and scheme:system are
supported. If you do not pass a scheme, the iframe starts in light mode. Pass
scheme:system when you want it to follow the visitor's system preference. See
Dark mode for more about color scheme behavior.
If your team uses runtime configuration flags, add them as path segments too:
https://getuserfeedback.com/embed/YOUR_API_KEY/SURVEY_ID/scheme:dark/flag:rebrand_v2/flag:checkout:treatmentflag:name and flag:name:true are equivalent. flag:name:value records a
variant. Use short lowercase flag names such as rebrand_v2. For variants, use
a short value such as treatment.
You can pass runtime configuration parameters in any order. For the best cache
hit rate, generate them in a deterministic order every time. A good default is
scheme:* first, then flags sorted by name.
Tips
- Treat the iframe URL as configuration, not content. Build it from your app key, survey ID, color scheme, and user identity.
- Use the runtime configuration color scheme (
/scheme:dark) when the color scheme should be server-rendered. - 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
- Limits — runtime configuration guardrails
- Hosted pages — share a direct link without an iframe