web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Publish custom JavaScript on Marketing forms hosted on external CMS etc

(0) ShareShare
ReportReport
Posted on by 135

Currently my understanding on running custom JavaScript code on a marketing form published as javascript code on an external CMS is that you have to embed the code on the actual page in the CMS.
Right now the CMS is maintained by 3rd party company so it's taking a lot of time updating this small code because of the chain of communication. It would be sooo much nicer to be able to maintain and publish ourself.

So, to sum up, the challenge is when you publish marketing forms in CMS that you dont control or maintain yourself - how to make updating the code as smooth as possible

Is it possible to maintain and embed custom JavaScript code on Marketing Forms without having to publish the code on the CMS page itself?
Or is it a way of a one-time-setup on that CMS page to reference the code in a neat way so we can eliminate the 3rd party handling of updates?

Preferably best practice or what your experience is. Any tools better than others, can it be done just in Dynamics or do we need to hook up some 3rd party to achieve this?
If this is already built-in Dynamics Marketing, let me know.

I'm not a developer so please reply any tips with that in mind.
Much appreciated

I have the same question (0)
  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    Hi Thomas,

    Currently embed custom JS code on marketing form is not supported, but you could take solution below as reference:

    1. Sign up a free GitHub account, then create a repository and upload .js file to the folder.

    pastedimage1593678170261v1.png

    pastedimage1593678202221v2.png

    2. The website Jsdelivr is tightly integrated with Github, it provides us with an API to fetch/load any repository file of any user.

    API, the first item: https://github.com/jsdelivr/jsdelivr#github

    e.g:

    My GitHub username is oremao, I created repository called WorkflowBox, and I uploaded clofly.js into it, then I could visit my raw JS code directly with format below:

    cdn.jsdelivr.net/gh/{{GitHub_username}}/{{repo_name}}/{{file}}

    https://cdn.jsdelivr.net/gh/oremao/WorkflowBox/clofly.js

    pastedimage1593678679996v3.png

    3. Embed the script link to our CMS page.

    pastedimage1593678740111v4.png

    fire our external function after form is loaded. (Check here for how to use Marketing form API)

    pastedimage1593678846726v5.png

    4. Result

    pastedimage1593678885938v6.png

    In a word, we host JS file on GitHub, thus we can modify JS code on GitHub server side without to embed code to CMS page again.

    Regards,

    Clofly

  • TGT Profile Picture
    135 on at

    This might work. I will have to test for my self.

    Thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans