I'm trying to create a technical and completely empty landing page in Cloud Pages that's going to be used for passing values to a Data Extension and then redirecting the person to website. I'm new to AmpScript but to achieve this result I prepared the followin:
- Link redirecting to the Cloud Pages LP in the email
- Code in the above-mentioned Cloud Pages LP that is supposed to insert data to the ButtonClicked column of DE (Test_DE) and after that redirect the person to the website.
%%[ var @buttonClicked set @buttonClicked = "true" set @insert = insertData("Test_DE","ButtonClicked", @buttonClicked) %%=Redirect('https://google.com/')=%% ]%%
This code doesn't work and I'm pretty sure that the problem is with the insertData function as the Redirect worked fine when tested alone. Could you please point me in the right direction? What I'm doing wrong?