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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Which scripts do I need to display forms?

(0) ShareShare
ReportReport
Posted on by 84
Hello

I have forms embedded on many pages on my website. I have these two scripts included on every page on the site, so that I can track web visits.

JavaScript code
<div id="xxx"></div><script src="">mktdplp102cdn.azureedge.net/.../ws-tracking.js class="d365-mkt-config" style="display:none" data-website-id="xxx" data-hostname="xxx.svc.dynamics.com"></div>
Form capture code
<script src="">mktdplp102cdn.azureedge.net/.../form-loader.js <div class="d365-mkt-config" style="display:none" data-website-id="xxx" data-hostname="xxx.svc.dynamics.com"> </div>

I also add this script where I want the form to display

Form code
<div data-form-block-id="xxx"></div> <script src="">mktdplp102cdn.azureedge.net/.../form-loader.js <div id="xxxxxxxx"></div><script src="">mktdplp102cdn.azureedge.net/.../ws-tracking.js class="d365-mkt-config" style="display:none" data-website-id="xxxx" data-hostname="xxxx.svc.dynamics.com"></div>

The Javascript console in my browser mentions that form-loader is included twice, and looking at the scripts, I see a lot of duplication. Do I need to repeat this code? Can I use less code where I want to display the form?

Thanks
Pete

I have the same question (0)
  • Suggested answer
    Nya Profile Picture
    29,060 on at

    Hi Pete,

    To embed a marketing form into an external website, you just need to copy the script in the marketing form page to the HTML of the website.

    pastedimage1648438301387v1.png

    pastedimage1648438454787v2.png

  • All My Systems Profile Picture
    84 on at

    Yes, I understand this. But the "JavaScript code" and "Form capture code" which you add to every every page when you set up a marketing website, include some duplicate scripts. Can these be omitted from the script used on the form page?

    Pete

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 209 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 71

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans