URL Parameters are parameters with values that are set dynamically within a page's URL. Adding URL parameters allows users to see a specific state or version of the consent form. Here are the URL parameters you can use:
- &channel=email – this sets the channel where consent is submitted. ‘Email’ is the option that is supported today. For all the consents submitted on websites, the channel defaults to ‘Website’.
- &autoSubmit=true – if this parameter is set then the form is not shown. Consent is directly processed and only the status of the submission (success or failure) is shown to the user. By default, this parameter is false. If the parameter is set to true, then values for all the required form fields must be sent using URL parameters.
- &locale=en – this displays the consent form in English
- &latestPreference=true – this displays the latest preferences for a Data Subject for the current form while rendering the form. This parameter can be accompanied by the brandPreference parameter below to show brand-specific latest preferences. Identifier values must be indicated in order to return the latest preference. If these values are not sent, then the blank form will be presented.
- &brandPreference=true – this displays the latest preferences submitted by the Data Subject for a specified brand (URLs are specific for a Form & a Brand. Hence brand and the Form name need not be specified).
In addition to these parameters, form field IDs can be used to control the behavior of the form fields and show default values when the form is rendered. Click the URL Parameters button under the Publish page to check the specific identifier values available; for example: name, email, phone number, etc. Below are the flags provided to control the behavior of the form fields:
- e - editable
- r - read only
- h - hidden
- d - not hidden (display)
- q - required
- n - not required
For example:
To pass value to a form field with ID 0a4beb93-0301-4bb0-bf1e-250fb8824a07 and make it read-only and hidden, you can specify 0a4beb93-0301-4bb0-bf1e-250fb8824a07_rh=email@gmail.com.
NOTE: Identifier values must be indicated in order to return the latest preference.
Sample Consent Form Parameter:
https://<consent form url>/form/?brandId=75085a63-de20-4b8c-a090-9d5cb562fd42&consentFormId=be937ba2-19e2-49c0-b6dd-c9d2ebd7c613&&locale=en&cd53f509-c15f-4031-b60d-18036d61d2de=John%20Doe&5a38597a-c715-4598-9153-47bc63f180e7=NA_US_AZ&latestPreference=true&brandPreference=true
Where:
- https://<consent form url>/form/?brandId=75085a63-de20-4b8c-a090-9d5cb562fd42&consentFormId=be937ba2-19e2-49c0-b6dd-c9d2ebd7c613 – the original link of the consent form
- &locale=en – the language setting for the consent form
- &cd53f509-c15f-4031-b60d-18036d61d2de=John%20Doe – the unique identifier value for name
- 5a38597a-c715-4598-9153-47bc63f180e7=NA_US_AZ – the unique identifier value for location
- &latestPreference=true – displays the most recent active consent submitted for this form
- &brandPreference=true – displays the most recent consent submitted for the specified brand