With the User Attributes feature, you can send attributes about your users and use them to target on-site surveys based on predefined conditions. For example, you could send us attributes such as when somebody signed up for your service, what industry they work in, or what their total customer lifetime value is.
This allows you to target a specific set of users visiting your site, such as “target this survey to paying customers only”, offering more relevant answers to the questions you have about your users.
Before you begin
- Ensure that you've first implemented the Identify API.
- Know which User Attributes are set up on your site. You'll need to save each attribute name in the targeting UI before you can use it.
- You can save and target a survey on an attribute name even before it's been set up on your site - the survey will start matching once the Identify API begins sending that attribute.
- User Attributes will only be captured alongside responses for on-site Surveys (Popover, Button, Embedded, or Full Screen)
- Attributes can only be viewed alongside responses when you download and view the CSV or XLSX survey responses file.
- Link Surveys will not include User Attributes with responses, as this type of Survey is hosted on a different domain to your site, meaning the code used to send User Attributes won’t be present on the Link Survey page.
Save User Attribute names for reuse
Before you can target a survey with a User Attribute, save its name in Manage user attributes. Saved names then appear in the Add attribute dropdown when you configure targeting.
- In the Add attribute dropdown, click Manage user attributes.
- Click Add, enter the attribute Name, and select its Type (String, Number, Date, or Boolean).
- Click Save.
The attribute name must match exactly the attribute being sent via the Identify API on your site.
Good to know:
- Saved attribute names are stored on your computer and can be reused in future surveys. They are not synced across browsers, devices, or teammates.
Targeting surveys with User Attributes
- Create or edit a survey.
- In the Target step, under Users, select Specific users.
- Click Add attribute.
- Select a saved User Attribute name from the dropdown, or use the search field to find it. If the attribute you need isn't listed, click Manage user attributes to add it first.
- Choose a condition and enter a value. For example, plan_type equals "premium" or signup_date less than 7 days ago.
- To add more attributes, click Add attribute again. Combine conditions using AND or OR logic to build precise targeting rules.
7. Activate and save your survey.
After saving, the survey will only appear to users whose User Attributes match all the conditions you've set.
If you're combining a JavaScript Event trigger with User Attribute targeting, make sure the trigger code runs after your Identify API call. The trigger relies on the attribute data already being sent to Contentsquare.
User Attribute FAQs
Can I see User Attributes in my survey results and responses?
After setting up User Attributes, these attributes are currently only visible in the downloaded CSV or XLSX file for your survey responses.
Can I target a survey on a User Attribute that hasn't been set up on my site yet?
Yes. You can save and configure targeting on any attribute name. The survey will only match real users once that attribute is being sent to Contentsquare via the Identify API.
How do I know which User Attributes are set up on my site?
Check with whoever implemented the Identify API on your site, or review your site's code. The survey targeting UI does not list attributes received by Contentsquare.
Where are my saved User Attribute names stored?
Saved names are kept in your browser's local storage on your computer. They are not shared with teammates or synced across browsers.
Can I combine multiple User Attribute conditions in a single survey?
Yes. Use AND to require all conditions to be true, or OR to require any of them. You can mix conditions across multiple attributes.