I am implementing a Custom Profile center. I tried to follow the method suggested by Adam here: Custom Profile/subscription center But get a 500 error when trying to load the page,
So, I further narrowed it down to the Cloudpagesurl Ampascript function example here:
https://ampscript.guide/cloudpagesurl/
And still get the error.
The Landing page contains only the following code, from the example in the documentation:
%%[
var @firstName
set @firstName = Lookup("Members", "First Name", "Subscriber Key", _subscriberKey)
]%%
<!DOCTYPE html>
<html>
<body>
<h2>Hello %%=v(@firstName)=%%,</h2>
<p>Welcome to your personalized landing page.</p>
</body>
</html>
What am I doing wrong?
PS
The SFMC instance is new, MC Connect works as expected, and I have 3 email subscribers.
%%[
. You could also add some basic exception handling to still be able to display the CloudPage even if the data is missing:%%[ set @firstName = Lookup("Members", "First Name", "Subscriber Key", _subscriberKey) IF empty (@firstName) THEN SET @firstName = "Customer" ENDIF ]%%