function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kwasi Asiedu 3Kwasi Asiedu 3 

Generate CloudPageURL without email send in Marketing Cloud

I have in place a custom preference / profile center built using a CloudPage. At the moment I am adding the link to the preference center using a AMPScript in the email template. This is what the AMPScript looks like and is entered into the 'href' attribute of the 'a' tag:
 
%%=CloudPagesURL(1682)=%%

The main functionality I would like to achieve is to be able to provide link to an individual's preference cente via a link on a website. I already have in place a API connection to Marketing Cloud. I am be able to provide the respective subscriber key via the API.

My question is there a way to generate the full URL based on the AMPScript CloudPageURL somehow in Marketing Cloud without the need to send an email?
Thanks.
Best Answer chosen by Kwasi Asiedu 3
NagendraNagendra (Salesforce Developers) 
Hi Kwasi,

The main utility of CloudPagesURL is the encrypted string generated automatically which provides references to the email (SubscriberKey, emailName.

In your case, you need to use the full URL on your page details in CloudPages (see image below) of your landing page and pass the SusbcriberKey as a parameter.

You can then get the parameter on the Landing Page side using QueryParameter or RequestParameter depending on your implementation.
User-added image

Thanks,
Nagendra