1

Recently I was working on this integration and got the solution which I can implement easily, by placing the below SSJS code on a cloud page. enter image description here

However, while I noticed that there is mention about using Code resource instead of Landing page will NOT consume Super Message! Reference I found on this page.

So my question is that by using Code Resource over a Landing Page will be beneficial? what are the pro and cons.

enter image description here

Also found there is no mention about 'Code Resource' on this document Marketing Cloud Pricing Sheet

Note:

  1. I am aware of that in scenarios where there is output to be displayed we have to use Landing page; however in my case as there is no need for an output and directly Inserting to my DE.
  2. Also I have confirmed that the above SSJS code works fine on a JS code resource.
1
  • The reason I suggested using a code resource was that their use doesn't attract charges for Super Messages.
    – Macca
    Commented Jul 15, 2020 at 8:32

2 Answers 2

4

Code Resources do not use up your Super Message quota. Your content-type headers are set for you, rather than having to explicitly set the value with SSJS/AMPScript as you would with a CloudPage. SFMC doesn't add its tracking code to the page as it does with CloudPages. Code Resources don't allow you to give the file a friendly name, like "FormSubmit", however. In your use case, TypeForm doesn't mind that.

2
  • 1
    All of the above. Personally I use Code Resources for any integration. Unless there is a branding requirement or visual elements to display, there is no reason for a "normal" landing page in my opinion. Commented Jul 15, 2020 at 9:00
  • Thanks for the confirmation Macca ... and @JonasLamberty thanks for sharing the above details stating when to use code resource and when to use Landing page. Commented Jul 15, 2020 at 10:19
3

One more thing to add to this topic, as I have come across it multiple times lately.

CloudPagesURL() function works for both Landing Pages and Code Resources. If they are in the same Business Unit as the code employing the function. It's just harder to find the right ID for a Code Resource, as the number shown in the URL is not correct and there is no menu for "page options".

You have two options for a Code Resource:

Option 1: Output the parameter %%=v(@tabId)=%% on the Code resource, and publish it. Access the URL in a browser to see the printed CloudPageID, e.g. 1111. If your Code resource is already live and you cannot simply republish it, then go for option 2):

Option 2: Save your Code Resource. Open another Code Resource; in this one, access the Code Resource Menu on the left and insert your Code Resource, this will show how to access it using CloudPagesURL(); e.g. %%=CloudPagesURL(1111)=%%

2
  • Thanks Jonas for sharing the above additional piece of information... definitely this would help anyone facing any related issue... Commented Jul 15, 2020 at 12:25
  • This is a great piece of information, Jonas.
    – Macca
    Commented Jul 15, 2020 at 13:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .