Positly Knowledge Base

Dynamically set Custom attributes using Query strings

Updated: 07, Tue, 2023 03:59 PM

Positly can have Custom attributes set dynamically for Participants using Query strings appended to the Completion link.

For example, you could set a Custom attribute “favouriteColor” as “blue” by adding &favouriteColor=blue to the end of activity link. It would look like this:
https://app.positly.com/#/f?task_id=ID&favouriteColor=blue

A few things to note:

  • Keys cannot have spaces in them
  • Keys cannot contain special URL characters (e.g. ? or &)
  • Keys and Values can be text or numbers
  • Values cannot contain special URL characters unless they are encoded

You can see an example here (or look at the code here).

GuidedTrack integration

If you use GuidedTrack to build your activities then you can simply add one of the following programs to automatically generate your end of activity URL.

  • *program: EndOfActivityButton   (for a button)
  • *program: EndOfActivityRedirect   (for a redirect)
  • *program: EndOfActivity   (for a link)

To include query string parameters simply include any query string parameters you set in the string variable “urlParams” using the format “{urlParams}&key=value”.

Alternatively, if you paste the end of activity link manually you can dynamically fill these using your GuidedTrack variable surrounded by squiggly brackets (“{” and “}”). For example:
https://app.positly.com/#/f?task_id=ID&favouriteColor={favouriteColor}

Other integration instructions

Helpful?

(No Ratings Yet)
Start accelerating your research
Don't wait to find quality participants and meet your research goals
Sign up for your free account now