To learn more basics about attributes, including how to set them up, read this article.

--

There may be times when you'd like to set an attribute for a visitor from a link they clicked. A common use case would be from an email, where you can insert existing data through a merge tag. Passing an attribute value through a URL allows you to then use it as a condition in a segment, make it accessible to other JavaScript on your website, or show it directly on your site.

To pass an attribute value through a query parameter, simply include the following query parameter in your URL: persosa_attr_<Attribute>=value .

For example, to set a visitor's first name where the property defined in Persosa is "first_name"

mysite.com?persosa_attr_first_name=Zach

Passing an attribute in the query parameter is the same as calling persosa('attribute', 'set', ...)  in code. There's currently no way to manage attribute arrays through query parameters.

Text properties

These are simple, just pass the text you'd like to set as shown in the previous example.

True/False attributes

True/False (or "boolean") attributes can be set by using their text equivalents. To set the property to True, pass "true".  To set the property to False, pass "false". Some examples:

mysite.com?persosa_attr_customer=true // Set to true
mysite.com?persosa_attr_customer=false // Set to false

Did this answer your question?