Stand-Alone survey – User attributes in the link
Pass user attributes such as plan, email or customer ID to PollHero directly via the link of a Stand-Alone survey.
You can add user attributes to the link of your Stand-Alone survey. PollHero stores them for the person who opens the survey via this link. This way, the reporting tells you, for example, which plan someone has or which newsletter they came from, without asking about it in the survey.
This works without a script on your website. All you need is the link from the Target tab of your survey.
Adding attributes to the link
Add each attribute to the link as a parameter attributes[name]=value. The first attribute starts with ?, every further one with &:
https://app.poll-hero.com/survey/YOUR-SURVEY-ID?attributes[plan]=pro&attributes[newsletter]=octoberIf your link already contains a ?, start directly with &.
When the survey is opened, PollHero passes the attributes on like a call of PH1.identify:
- PollHero stores standard fields such as
email,customer_type,countryorlanguagein the profile attributes of the same name. - PollHero stores all other names as custom attributes.
- PollHero stores
attributes[customer_id]as the customer ID and also uses the value as the identifier, like the first argument ofPH1.identify. This lets PollHero assign the participation to a profile that already exists in this project with the same customer ID.
If the same person sends attributes again later, PollHero overwrites values with the same name. Other custom attributes are kept.
Rules for names and values
| Rule | What happens otherwise |
|---|---|
Only simple pairs attributes[name]=value | PollHero discards nested entries such as attributes[plan][name]=pro. |
| Name at most 64 characters, not digits only | PollHero discards longer or purely numeric names. |
| Value at most 255 characters | PollHero discards longer values. |
| Value not empty | PollHero discards empty values such as attributes[plan]=. |
| At most 20 attributes per link | PollHero takes the first 20 valid attributes and ignores the rest. |
PollHero removes spaces at the beginning and end of names and values. All values arrive as text, including numbers such as 42.
Discarded attributes do no harm: the survey still opens, and all valid attributes are taken over.
Encoding special characters
Values with special characters must be URL-encoded, otherwise they arrive incorrectly or cut off:
| Character | Encoded | Example |
|---|---|---|
@ | %40 | attributes[email]=anna%40example.com |
| Space | %20 | attributes[campaign]=black%20friday |
& | %26 | attributes[company]=M%C3%BCller%20%26%20S%C3%B6hne |
+ | %2B | attributes[phone]=%2B4930123456 |
# | %23 | attributes[ticket]=%2342 |
You encode umlauts such as ü as %C3%BC. The square brackets may be encoded as well (attributes%5Bplan%5D=pro); PollHero understands both notations.
Example: link in a newsletter
Most email tools replace placeholders with the recipient's data when sending. If you put such placeholders into the survey link, every response arrives with the matching attributes. What the placeholders look like depends on your tool, in Mailchimp for example *|EMAIL|*:
https://app.poll-hero.com/survey/YOUR-SURVEY-ID?attributes[email]=*|EMAIL|*&attributes[customer_id]=*|CUSTID|*&attributes[newsletter]=2026-11Here, CUSTID stands for a custom field with your customer ID. Send yourself a test email before sending and check in the opened link whether the placeholders were replaced and special characters such as @ are encoded correctly.
Everything in the link is visible to recipients and ends up in the browser history, for example. Therefore, only pass data that may appear there.
Preview link
You can also add attributes to the preview link; the link stays valid. Because PollHero saves nothing in preview mode, the attributes are not taken over, though. To test the attributes, use the regular link of a running survey.
Where to find the attributes
The attributes from the link are regular user attributes of the person:
- CSV export: one column per attribute, see View reporting.
- Segments in the reporting: filter via Custom attributes in the User category, see Segmented reporting.
- Data Export API and webhooks: in the
respondent.attributesobject, see Filter by respondent attributes and Webhooks.
Reporting, export and API always show the current state of the profile. If an attribute changes later, you also see the new value for older responses.
For the targeting of Onsite and Embedded surveys on your website, the attributes only count if PollHero assigns the visitor there to the same profile. The Stand-Alone survey runs on app.poll-hero.com, so the browser has a different PollHero user ID there than on your website.