GetQueryStringParameter
Retrieves the value of a query string parameter from the URL of a landing page or CloudPages page.
GetQueryStringParameter(1)
Ordinal | Type | Description |
---|---|---|
1 | String | Required. The key name of a query string parameter in the URL of a landing page or CloudPages page. |
This code example retrieves the value of the firstName
query string parameter in the URL.
For example, assume that a user visits a page with this URL:
In this case, because the firstName
query parameter has a value, the user sees a message that includes their name.
However, if the firstName
query parameter wasn’t present in the URL, or if the key was specified without a value, the user sees a generic message that contains a fallback value for the custName
variable.