I have a simple Landing page, and it’s URL contains some parameter values and those parameters are also Fields in a Data Extension of a Marketing Cloud Account.
To update those parameter values into the Marketing Data Extension when a URL is pasted in your Web Browser, I would follow the below steps:
- Let us have an example URL of a landing page: www.abc.com
- For the full landing page url along with the parameter values, let’s take
www.abc.com?Field_1=aaa&Field_2=bbb&Field_3=ccc
Paste the code given below in your Landing page. We have defined the parameter values first and then printing the success and failure values on the page:
%%[
set @f1= RequestParameter(‘Field_1’)
Set @f2= RequestParameter(‘Field_2’)
set @f3= RequestParameter(‘Field_3′)
if( @f1 == ”)then
set @fail =’Failure’
else
InsertData(‘Data extension Name’,’Field_1′,@f1,’Field_2′,@f2,’Field_3′,@f3)
set @suc= ‘Success’
endif
]%%
%%[ IF @f1== “” THEN ]%%
%%= v(@fail) =%%<br>
%%[else]%%
%%= v(@suc) =%%
%%[ ENDIF ]%%
Help Site: