Every time you create an experiment, Sticky will generate a link you can share with your participants. You can use the link as is, or you can customise it and expand its functionality. In this article we will discover the full potential of a redirect link.
Path Variables
You can pass in multiple path variables in /name/value
format. Remember, values have to be URL encoded.
Path variables:participant
- participant IDsuccesslink
- where to redirect the user after a complete sessionfailurelink
- where to redirect the user after an incomplete sessionlocale
- language (overrides what is selected on the platform)
You can use our UI to help you create URL encoded values for success and failure redirect links, just enter the links and we will create a URL you can share with your participants:
Query Parameters
By default, query parameters passed to the experiment link have no impact on how the session is set up and run. Adding ?participant=john-doe
will not change the participant ID in Sticky.
If you want to use query params, you can create placeholders in the URL that will be replaced with values from query params. Placeholders are formatted like this __URLVAR_[queryparam]__
and they will be replaced with the value of queryparam
they are mapped to.
Example:
If the panel provides participant id with query param named pid
and we want to map it to participant
in Sticky we will use participant/__URLVAR_pid__
.
The whole link will look something like this: https://studies-v2.sticky.ai/ZFfP3SfohsmdNJDYDh0eW/participant/__URLVAR_pid__?pid=john-doe
In this example, the value __URLVAR_pid__
will be replaced with john-doe
which is the value of the pid
parameter. Note that query params (everything after ?
character in the URL, including ?
) will be added by the panel automatically.
Now that you know how to use the path variables and query params, you can easily set up everything in the UI and we will generate the redirect link for you!