This article describes how to set up the Refiner tag in your tag management account.
Refiner shows targeted in-app and website surveys, such as NPS and CSAT, and links survey responses to user and account data.
Tag tips
- The tag loads the Refiner JavaScript SDK for the configured project ID one time per page. The SDK tracks page views automatically, including single-page app navigation.
- Map User ID or User Email on every page. Refiner records events only for users identified on the same page.
- Use mapping to:
- Add user and account traits, and attach data and tags to survey responses.
- Track events in the Events tab. Refiner records the event name only.
- Show a survey by ID, reset the user on logout, or override the project ID.
- When you enable Refiner: Identity Verification, map the signature computed on your server to the
signaturedestination. Never map the Refiner secret key. - Map a variable to the Cookie Consent destination to send consent changes. After the destination receives
revoke, the tag stops sending user data, events, and surveys on that page until the destination receivesgrant. Refiner does not remember the revoked state, so map a consent variable that is present on every page. - When you set Require User Consent to True, Refiner stays inactive and does not show surveys until the Cookie Consent destination receives
grantor the user has granted consent on an earlier visit. - The tag supports one Refiner project per page. If your profile already loads Refiner with a Custom Container tag, remove that tag in the same publish that adds this tag.
- For more information, see Refiner: JavaScript SDK reference.
Tag configuration
Go to the tag marketplace to add a new tag. For more information, see About tags.
When adding the tag, configure the following settings:
- Project ID: (Required) Your Refiner project ID. In Refiner, go to Settings > JavaScript SDK to find the project ID. The tag does not fire when the project ID is missing or is not in the format that Refiner uses.
- Storage Method: The browser storage that the Refiner SDK uses for visitor data. Options are Local Storage with Cookie Fallback (default), Local Storage, and Session Storage.
- Require User Consent: When set to True, Refiner stays inactive until the Cookie Consent destination receives
grant. Options are False (default) and True.
Load rules
Load the tag on all pages or set conditions for when your tag loads. For more information, see About load rules.
Data mappings
Mapping is the process of sending data from a data layer variable to the corresponding destination variable of the vendor tag. For more information, see About data mappings.
The available categories are:
Configuration
Select a destination to override a value set in the tag configuration.
| Variable | Type | Description |
|---|---|---|
project_id | String | Overrides the Project ID set in the tag configuration. |
Standard
Map data layer variables to identify users and accounts and to control survey behavior.
| Variable | Type | Description |
|---|---|---|
user.id | String | User ID. The unique user identifier from your system. |
user.email | String | User Email. The email address of the user. |
user.name | String | User Name. The full name of the user. |
account.id | String | Account ID. The identifier of the account or company that the user belongs to. |
account.name | String | Account Name. The account or company name. |
signature | String | Identity Verification Signature. The HMAC-SHA256 signature computed on your server for Identity Verification. |
locale | String | Locale. A comma-separated list of ISO 639-1 language codes, for example fr,en. |
reset_user | Boolean | Reset User. When true, clears the identified user. Map this variable on the logout event only. |
response_tags | Array | Response Tags. An array or comma-separated list of up to 10 tags to attach to survey responses. |
show_form_id | String | Show Survey ID. The survey ID from the Manual trigger settings of the survey in Refiner. |
Custom user traits
Enter a trait name to send a custom user trait to Refiner. Refiner stores traits with names that end in _at or _date as dates.
| Variable | Type | Description |
|---|---|---|
user.{trait_name} | String | A custom user trait. |
Custom account traits
Enter a trait name to send a custom account trait to Refiner. Refiner stores traits with names that end in _at or _date as dates.
| Variable | Type | Description |
|---|---|---|
account.{trait_name} | String | A custom account trait. |
Response data
Enter a field name to attach a value to upcoming survey responses.
| Variable | Type | Description |
|---|---|---|
response.{field_name} | String | A custom response field. |
Events
Map a data layer variable to track a Refiner event when the variable matches a value. Refiner records the event name only.
To map an event, use the following steps:
- In the Events tab, enter the value of the mapped variable that triggers the event.
- Select Custom.
- In the Custom event name box, enter the Refiner event name.
- Click Apply.
| Event | Type | Description |
|---|---|---|
Custom | String | Tracks a Refiner event with the custom event name. |
Cookie consent
Map to the Cookie Consent destination to control cookie consent based on the consent state of a user.
| Variable | Type | Description |
|---|---|---|
grant | String | Grant cookie consent. |
revoke | String | Revoke cookie consent. The tag clears the identified user, closes any open survey, and stops sending user data, events, and surveys on the page until the destination receives grant. |
This page was last updated: December 2, 2026