as the title says, I have a number of products in an email in SFMC. On click on any of the products, I'm trying to capture the product clicked on, upsert the name of it to a Data Extension then open / be redirected to a cloud thank you landing page saying something like "Hi FIRSTNAME, thanks for choosing PRODUCTNAME". I want to do this with AMPscript. Can anyone help please? Thanks!
Product name upsert to a data extension on click and redirection to cloud thank you landing page through AMPscript
ampscriptmarketing-cloudupsert
Best Answer
This is fairly simple to do. There are 2 options on how to do this.
My recommendation would be approach 2. This reduces the need for multiple pages, simplifying editing and maintenance - as well as reducing the number of redirects (which can sometimes cause issues if too many)
So for email link you would do something like:
Where the CloudpagesUrl function would set parameter
p
as the value of 'apple' (or whatever product name you want to pass).Then on the page, you would put:
Which would then collect the value of the parameter p that we set in the url in the email.
Then we would upsert it using the UpsertData Function.
From there you just use IF statements and other variables, etc. to create your page.
Like: