0

i created a landing page that contains a smart capture but i want to retrieve the pageID of this page and then add it to the data extension.

I'm using this in my email to redirect to my cloudpage :

%%=CloudPagesURL(1140)=%%

And the fact is that i cannot add other parameters but i need to retrieve this "1140" and print it in my hidden field.

I tried to use %%_EmailID%% and requestParameter but it didn't work, maybe i did it in the wrong way.

So is there any possibility to retrieve the pageID and print it in a smart capture hidden field ?

  • Doesn't return the Cloud Page ID, but the page URL could be retrieved using %%=RequestParameter('PAGEURL')=%% Since PageUrl and ID are a one to one relationship, maybe this could help? If you are looking for an encryption / decryption alternative - encryptsymmetric() can be combined with the URL, and resolved with decryptsymmetric(). – Jonas Lamberty Feb 21 at 13:45
  • If you use %%=CloudPagesURL(1140,"cid","1140)=%% you can then retrieve this inside of the Page using SET @CID = RequestParameter("cid"). The parameters you add affter the page number in CloudPagesURL will not show in the URL, as they are 'hidden' like all the email related information is when passed across. (ref: developer.salesforce.com/docs/…) – Gortonington Feb 21 at 14:08
  • Thanks to both of you, I already tried to use RequestParameter this way but that doesn't solve my problem. The solution %% = CloudPagesURL (1140, "cid", "1140) = %% works very well I tested it but I am looking for something more" automatic ". I work with people who are not really capable to do this kind of manipulation without making a mistake (if I don't find another solution I will use this one) Basically, I have a giant data extension that will be filled by the results of all the forms on different cloud pages. So I have to be able to distinguish which cloudpage a form result comes from – Renck Feb 21 at 14:26
  • This is why I have to find a way to obtain either the name of the page or the id of the page which must remain fixed for this page. – Renck Feb 21 at 14:26
  • I'm not sure how a pageId might help. There aren't really any APIs to do anything with this. You could look at creating a Content Builder SDK block that can work in CloudPages, these days. Maybe you can get the muppets to use a little UI to define what the form's about and use the SDK block to create a hidden field that's saved when you post. – Macca Feb 21 at 14:43
2

If you look at the source HTML created by a Smart Capture, you'll see this is what it creates...

enter image description here

The PageID's never populated, but the TabID is and that's the one you see in the properties of a CloudPage and the ID you use in your CloudPagesURL() function. You can include your PageID in your target Data Extension simply by including a "TabID" field in the DE.

| improve this answer | |
  • Thanks you ! That's exactly what i was looking for, where did you found this ? – Renck Feb 21 at 15:51
  • 1
    Inveterate hacking. – Macca Feb 21 at 15:52

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.