0

We have a case where we would send an email to a list of subscribers, which would have a link to a Marketing Cloud landing page with more information about the product offerings. On that page we would also have a link to the MC preference/unsubscribe page, where the subscriber can manage preferences or unsubscribe. Now, we're still at the formative stages and would like to know, from a code-perspective, whether it is possible to pass the subscriber values twice (1. from email to product landing page, and 2. from the product landing page to the preference page), at the end of the line enabling the subscriber to manage preferences ? If yes, are there any code examples we could use?

4

From a functionality point of view, this is definitely approachable. You will be extensively using the CloudpageURL function to pass parameters onto cloudpages.

Step 1: (Passing values from email to Cloudpage1)

  • @parameter1 can be a value in your sendable DE or subscriberkey or anything set within the email which will be passed into Cloudpage1.
  • 123 is the sample ID of the first cloudpage (e.g Cloudpage1) you'll be redirecting from the email.
%%[
VAR @parameter1

SET @parameter1 = [value1]

SET @Cloudpage1 = CloudPagesURL(123, 'p1', @parameter1)

RedirectTo(@Cloudpage1)
]%%

Step 2: (Passing values from Cloudpage1 to Cloudpage 2)

  • @parameter2 will contain the value passed within parameter p1 from Cloudpage1.
  • 456 is the sample ID of the second cloudpage (e.g Cloudpage2) you'll be passing the parameter value.
  • Once the required condition is met then you would be using the Redirect function to navigate to Cloudpage2
%%[
VAR @parameter2

SET @parameter2 = RequestParameter('p1')

SET @Cloudpage2 = CloudPagesURL(456, 'p2', @parameter2)

IF @Condition = 'something' THEN
    Redirect(@Cloudpage2)
ENDIF
]%%

Step 3: (Retrieving in Cloupage2)

  • @parameter3 will contain the value passed in parameter p2 from Cloudpage1.
  • 456 is the sample ID of the second cloudpage you'll be passing the parameter value.
  • Once the required condition is met then you would be using the Redirect function to navigate to Cloudpage2
%%[
VAR @parameter3

SET @parameter3 = RequestParameter('p2')

SET @DoAnything
]%%

Using the CloudpagesURL function the parameters will be encrypted.

Reference:

| improve this answer | |
  • Cheers Brad for an extensive explanation. We will try your approach in the implementation stage. – nix9247 Nov 11 '19 at 13:03
  • no worries @nix9247. Let me know if you got any questions. – Brad Sapkota Nov 11 '19 at 22:25
1

The answer to your questions is YES.

You can use CloudPagesURL function. Bear in mind that when using CloudPagesURL, some parameters are automatically encrypted and passed through the URL.

Example:

<a href="%%=RedirectTo(CloudPagesURL(1000))=%%">Product Page</a>

Using this link on your email to redirect to your CloudPage having the id 1000, you will be able to get these variables on your product page:

SET @emailaddr = AttributeValue("emailaddr")
SET @emailName = AttributeValue("emailname_") 
SET @subKey = AttributeValue("_subscriberkey")

If you want to pass additionnal parameters, you can simply add name and value pairs like:

<a href="%%=RedirectTo(CloudPagesURL(1000, 'ProductCode', '1234'))=%%">Product Page</a>
| improve this answer | |
  • Thanks Rachid. I suppose the second step would be to invoke these variable on the preference page? – nix9247 Nov 11 '19 at 12:48
1

Yes, you can use CloudPagesURL as Rachid mentioned. We usually use it when we manage preferences in Marketing Cloud and we want to pass it from 1 to another landing page in SFMC.

Hope this helps

| improve this answer | |
  • Thanks! I will be the taker. – nix9247 Nov 11 '19 at 12:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.