I have a button as an image in an Email in MC. (below)
<td width="41"><a href="%%=RedirectTo(@link0)=%%" target="_blank"><img src="nps_0.jpg" width="41" alt="0" style="max-width:41px;height:auto;" class="survey-table"></a></td>
I have the following AMPscript in the email to redirect customers to a cloudpage & pass some url parameters.
%%[var @id, @link0 set @id=[id] set @link0=Concat("CloudpageURL?nps=0&campaign=Onboarding&id=",@id)]%%
This part works fine & I can see the parameters along with the url when the image is clicked.
What I also want to do is send these parameters to a DE. The cloud page has no SUBMIT button. Below is my code in the Cloud page but it isn't working.
%%[var @id, @campaign, @nps set @id = RequestParameter('id') set @campaign = RequestParameter('campaign') set @nps = RequestParameter('nps') InsertDE('NPS_test','campaign',@campaign,'nps',@nps,'id',@id)]%%