Contact Us

February 23, 2024

May 13, 2026 1:28 pm

Passing subscriberkey to next page in smart capture form

Share with

Understanding the Issue

The problem lies in the way Smart Capture forms handle redirects and how the subscriberkey is generated and passed. When using a hidden field in Smart Capture with %%=GUID()=%% to generate a unique subscriberkey, this value is not automatically passed to the next page in a redirect.

Root Cause

The root cause of this issue is that the subscriberkey is not being stored in a way that can be accessed by the next page in the redirect. This is because the subscriberkey is generated on the client-side using JavaScript and is not stored in a server-side session or cookie.

Step-by-Step Solution

To fix this issue, you can use a CloudPage with an auto-generated GUID and then pass that GUID as a parameter in the redirect URL. Here is an example of how you can do this using AMPscript:

CloudPage.html

%%[ var guid = GUID() ]%%
Next Page

Alternatively, you can use SSJS to generate a GUID and store it in a server-side session or cookie, and then pass that value as a parameter in the redirect URL.

Best Practices

To avoid this issue in the future, it is recommended to use a custom web form instead of Smart Capture, as it provides more flexibility and control over the form data and redirect process.

Heads up: Make sure to test your CloudPage and redirect URL to ensure that the subscriberkey is being passed correctly.

Checklist

Fixing Subscriberkey Passing Issue

  • Use a CloudPage with an auto-generated GUID
  • Pass the GUID as a parameter in the redirect URL
  • Use AMPscript or SSJS to generate and store the GUID
  • Test your CloudPage and redirect URL to ensure correct subscriberkey passing
  • Consider using a custom web form instead of Smart Capture
  • Use a server-side session or cookie to store the subscriberkey
  • Use URL personalization with _subscriberkey to pass the subscriberkey in the redirect URL

Frequently Asked Questions

What is the best way to generate a unique subscriberkey in Smart Capture?

The best way to generate a unique subscriberkey in Smart Capture is to use a hidden field with %%=GUID()=%%.

How can I pass the subscriberkey to the next page in a redirect?

You can pass the subscriberkey to the next page in a redirect by using a CloudPage with an auto-generated GUID and then passing that GUID as a parameter in the redirect URL.

What is the difference between using AMPscript and SSJS to generate a GUID?

AMPscript is a client-side scripting language, while SSJS is a server-side scripting language. Using SSJS to generate a GUID provides more security and flexibility.

Can I use a custom web form instead of Smart Capture?

Yes, you can use a custom web form instead of Smart Capture. Custom web forms provide more flexibility and control over the form data and redirect process.

How can I test my CloudPage and redirect URL to ensure correct subscriberkey passing?

You can test your CloudPage and redirect URL by using a tool like Postman or cURL to simulate a form submission and verify that the subscriberkey is being passed correctly.

Genetrix Technology · Salesforce Marketing Cloud Partner

Need help shipping this in production?

Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.

Get in Touch with Genetrix →

Blogs for the

Business-Savvy!​

Let’s Connect

A 30 min no cost strategy session
with cloud support expert

Let’s Connect

A 30 min no cost strategy session
with cloud support expert