Skip to main content
2 of 4
added 41 characters in body
Adrian Larson
  • 151.3k
  • 38
  • 247
  • 431

Marketing Cloud AmpScript BaseDecode64

I have a question with basedecode64 function.

The following variables are not getting decoded when passed in the cloud pages. In email I am using following ampscript.

Email
%%[ VAR @Member_Number, @Email_Address,@LPURL 
SET @Member_Number = Base64Encode(MemberNumber) 
SET @Email_Address =Base64Encode(EmailAddress) 
SET @LPURL = Concat('http://example.com/page.aspx?EmailAddress=',@Email_Address,'&Member_Number=',@Member_Number)]%%
 
%%=RedirectTo(@LPURL)=%%

When someone clicks, on above following gets captured in landing page. I am using insertdata function to capture the subscribers details. However when I click on the records in DE, they are still coming as encrypted.

%%[
 
VAR @Member_Number, @Email_Address, @ClickDate
/* Get Data From DE */
SET @Member_Number = RequestParameter("Member_Number")
Set @Member_Number1 = Base64Decode(@Member_Number)
SET @Email_Address = RequestParameter("EmailAddress")
SET @Email_Address1 = Base64Decode(@Email_Address)
SET @ClickDate = Format(SystemDateToLocalDate(NOW()),"yyyy-MM-dd HH:mm:ss")
IF NOT EMPTY(@Member_Number) THEN
 
InsertData("LandingPageDE","MemberNumber", @Member_Number1, "EmailAddress", @Email_Address1, "ClickDate", @ClickDate)
 
ENDIF
]%%
Chandan
  • 673
  • 1
  • 9
  • 31