As a user, if I click a button in the email, a webpage need to open with my name visible in the UI.
A sample email in Content Builder of the Marketing Cloud
A sample CloudPage in Web Studio of the Marketing Cloud
Step -1:
Create a sample cloud page (landing page) in the SFMC web studio.
Add an HTML block and include some AMPscript logic to select the query parameters and assign it to a variable (refer the below sample code)
Sample Code: Cloud Page
%%[
Set @paremeter1 = QueryParameter('parameter1')
]%%
<p>Hello %%=v(@paremeter1)=%%.</p>
<br>
Welcome to the website.
Make necessary changes to look the UI look stylish (I used a very basic UI here) using CSS and other HTML components
Save and publish this page
Go to settings of this cloudpage and find the cloudpage ID (need to use this in the step 2)
Step 2:
Create a sample email in the SFMC content builder
Add a code snippet block, create a variable and assign the profile attributes of your choice to it
Create a Button, go to 'link area' and set to 'Others'
On the Link URL, define the cloud page ID which is created from step 1 and set the parameters from the code snippet block (refer the image below)
Sample Code: Code Snippet
%%[
Set @variable1 = AttributeValue("HCP First Name") // paste the profile attribute here
]%%
Sample Code: Button Link To
%%=CloudPagesURL(5377,'parameter1',@variable1)=%%
Step 3:
Go to preview and Test in the content builder, select any contacts of the choice and send the test mail.
Once you click on the button, a webpage will open and display the name of the selected user.
Please make necessary changes (to email and cloud page) of your choice to make this look nicer
Conclusion
As a marketing cloud developer, by using the AMPscript and SSJS we can always create dynamic web pages which will allow to pass the profile attributes from email to cloud pages to achieve the personalization at its best. Hope this article helps you to build much more insightful use cases.
By Ameen Rahman