0

I am running a script on a Cloudpage and want to send data to one out of a set of cloudpages, chosen by a given logic. The target Cloudpage URLs follow a schema, and I know the target URLs. Say: https://www.mysubdomain.domain.com/page1" / "https://www.mysubdomain.domain.com/page2" / "https://www.mysubdomain.domain.com/page3"

However, I want to send data with the CloudPagesURL() function to leverage its native encryption capabilities. CloudPagesURL works with the Cloudpage's ID however, and they have no schema at all. Say "1234", "7890", "5678".

So I'd need to get the right page via:

CloudPagesURL(1234)

And I have found no way to find this number with the API or similar.

Is there a way to programmatically retrieve a CloudPage's ID by its URL? Or any other means (content, location,...)

I have tried using:

{{restEndpoint}}/asset/v1/content/assets?$pagesize=450&$filter=assetType.id=205 

as 205 is the ID for a "web page" asset. It does return cloudpages, but neither does the response list the Cloudpage ID (1234) nor the URL.

If there is no solution, my other workaround would be setting up my own encryption with encryptSymmetric / Decryptsymmetric and post to the URLs instead.

Thanks!

0

An answer was given here:

Retrieve CloudPages pageID in smart capture hidden field

I'll try to find a solution leveraging the outlined functionality:

<script type="javascript" runat="server">
Platform.Load("Core","1");
var pageID = Platform.Variable.GetValue('@tabID')
Write(pageID);
</script>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.