QueryParameter

This function retrieves a value from a URL query string, based on a defined parameter key.

NOTE: You can use this function to retrieve parameter values from encrypted query string URLs created by the CloudPagesURL or MicrositeURL functions.

Argument

QueryParameter(1)

Ordinal Type Required Description
1 String True URL parameter key

Example

An email is sent with a link to a landing page created in CloudPages. The link uses the CloudPagesURL function to include a field as a URL parameter, based on a value in the Sendable Data Extension.

<a href="%%=CloudPagesURL(123,'p',Product)=%%">view your product page</a>

The landing page includes the following code:

<!DOCTYPE html>
<html>
   <body>
      <p>Thank you for purchasing %%=QueryParameter('p')=%%.</p>
   </body>
</html>

Output

The CloudPagesURL function returns the page URL of the landing page appended with an encrypted query string of Subscriber data and the URL parameter.

The page is personalized with the corresponding Product value from the Sendable Data Extension which is retrieved from the decrypted p query string parameter.

<!DOCTYPE html>
<html>
   <body>
      <p>Thank you for purchasing blue sunglasses.</p>
   </body>
</html>