I've been trying to insert/reference an SSJS code resource in my landing page but using the CloudPagesURL(123) function doesn't seem to work? I've been using the function when referencing javascript using the format below and is working fine:
<script src="%%=CloudPagesURL(001)=%%"></script>
Using the above format doesn't work for my page, neither the ones below:
<script type="javascript" runat="server" src="%%=CloudPagesURL(123)=%%"></script>
<script type="javascript" runat="server">%%=CloudPagesURL(123)=%%</script>
or directly pasting the function in the HTML - %%=CloudPagesURL(123)=%%
Does SSJS needs to be pasted directly in the HTML? Thanks in advance.