Google Tag Manager
Install the widget through GTM using our community template — no code required for the basics.
- Last reviewed
Google Tag Manager
The fastest way to add getuserfeedback.com through GTM is our community template. It handles the widget loader, color scheme, and user identity — all from the GTM UI, no code required.
1. Add the template
- In your GTM workspace, click Templates in the left sidebar.
- Under Tag Templates, click Search Gallery.
- Search for getuserfeedback.com.
- Click the template entry, review the permissions, and click Add to workspace.
The template is now available as a tag type in your container.
2. Create a tag
- Go to Tags and click New.
- Choose getuserfeedback.com as the tag type.
- Paste your API key (find it in Settings → Widget in the getuserfeedback.com dashboard).
- Set the trigger — All Pages is a good default.
- Save and publish.
That's it. The widget is now loading on your site.
3. Configure color scheme
Open the Color Scheme section in the tag settings. You have five options:
| Mode | What it does |
|---|---|
| Sync with host attributes (default) | Watches your site's class and data-theme attributes to match light/dark mode automatically. This is the recommended default — see Dark mode for how it works. |
| Always light | Forces the widget to light mode. |
| Always dark | Forces the widget to dark mode. |
| Follow system preference | Uses the visitor's OS-level light/dark setting. |
| Resolve from GTM variable | Reads a GTM variable that returns light, dark, system, auto, or a comma-separated list of attribute names. |
If you choose Sync with host attributes, you can customize which HTML/body
attributes the widget watches (defaults to class and data-theme).
4. Identify your users
Open the User Identity section. There are three modes:
| Mode | What it does |
|---|---|
| Intelligent (default) | Automatically reads common data layer keys for user ID, email, phone, first name, and last name. If your data layer already has user info, this just works. |
| Custom | Lets you pick the main identity type (user ID, email, or phone), map it to a GTM variable, and add trait rows for any extra fields you want to send. |
| Disabled | Skips user identity entirely. Good for anonymous surveys. |
For most teams, Intelligent mode is all you need. It picks up user data from your data layer without any configuration. See Personalization for more on how user identity powers targeting and segmentation.
That's it — you're live
Surveys will now show up automatically based on the targeting rules you set in the getuserfeedback.com dashboard. Most teams don't need to write any code beyond this point.
If you do want to open a specific survey from a button or custom trigger, see Opening surveys from code.
Consent
The template follows GTM's built-in Consent Mode. If your GTM container uses
consent signals (like analytics_storage), the widget respects them
automatically — no extra configuration needed.
Alternative: Custom HTML
If you prefer not to use the community template, you can add a Custom HTML tag with the loader script directly:
<script
async
src="https://cdn.getuserfeedback.com/widget/loader/v1/YOUR_API_KEY/loader.js"
data-api-key="YOUR_API_KEY"
></script>
This gives you the same capabilities but skips the template's built-in color scheme and user identity UI. You'd configure those in code instead — see JavaScript snippet for the method reference.
Going further
- Personalization — targeting, personalization, and behavioral segmentation
- Dark mode — how intelligent color scheme detection works
- JavaScript snippet — the browser global reference