I am trying to update a data extension using an email recipient's email address as the unique identifier - when the email recipient presses a button in the email, I want to go to a landing page that processes the DE update and redirects to a new site. I have the following code, but not sure what I'm doing wrong. The email address is being passed through the URL to the processing landing page.

I've searched through all of the resources / answers I can find and still stuck.

<script runat="server" language="ampscript">

Var @Email, @Double_Opt_In


<meta http-equiv="refresh" content="0; url=https://someurl.com">

2 Answers 2


The below is if you're using Cloud Pages:

First of all, if you're sending the email from Email Studio, and the page is hosted in Cloud Pages; you don't have to push the email address in the URL. If your sendable Data Extension has the email address; you can use CloudPagesURL to push the email address to the Cloud page. See documentation: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/cloudpagesurl.htm?search_text=cloudpagesurl

Once you do that, in the Cloud Pages;

SET @email = RequestParameter('')

<script runat=server>

Make sure that you define AMPscript code block separately, and the SSJS code block separately.

Here are the documentations for redirecting:




Is this on an SFMC landing page or CloudPage? If so, you don't have to put your UpdateDE code in script tags, although it should still work.

With regards to the code itself, try setting the email variable with

SET @Email = RequestParameter('Email')

Instead. Here's a working example of something similar I do but with a unique ID number instead of email address. At the bottom of the landing page this block of Ampscript runs:

        VAR @encodedstr, @PID
        SET @encodedstr = RequestParameter("PID")
        SET @PID = Base64Decode(@encodedStr, 'UTF-8')


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .