I am relatively new to the AMPScripting world, I am trying to embed a dynamic URL in an e-mail using AMPScript using Lookup()
Q1. How can I make this work with any DE? Not just with TestDE. Can I pass TestDE as a parameter as well to Lookup()? Q2. When I preview the link in a web browser, it displays private data in the address bar, how can that be hidden?
My example code below: Thanks to @Adam for the sample code
%%[ SET @SFContactId = AttributeValue("Contact ID") SET @BaseURL = 'blah.com/blah/blah' SET @FirstNameOriginal = Lookup("TestDE","First Name","Contact ID",@SFContactId) SET @FirstName = ProperCase(@FirstNameOriginal) SET @SFEmail = Lookup("TestDE","Email","Contact ID",@SFContactId) SET @URL = CONCAT('http://', @BaseURL, '?Name=', @FirstName, '&Email=', @SFEmail,'&Contact=', @SFContactId) ]%%