Hello,
I'm trying to capture two different forms (which are both in different url paths) in our Single Page Application.
When I go to one of these paths, the script provided gets loaded and everything works properly.
The problem that I'm facing is when I navigate from the path of one form to the other one. It gives us the following error, since the script is already there:
MsCrmFormLoader is already defined, make sure Dynamics 365 Marketing loader.js script is not included twice in the page.
Could someone guide me on what would be the best approach to solve it?
Hi ,
The issue can stem from different direction here based on redendering/Load function call.
Please check the following solutions:
1. Is the javascript function registered twice on the onload event? if yes, delete the duplication
2. Does the javascript function calls another function that loads the web resource? ex: body=onload is called twice ? Self-execution happening twice anywhere?
3. If none of the above then see if there is a: delete MsCrmMkt.MsCrmFormLoader and try again.
Hi Roy, thanks for the answer.
Yes, both forms are in the same domain. We are currently using only one form tracking script for the form capturing, but I don't think we are using the web tracking one. Should we be using it?
On the other side, we have embedded the script directly in the code on a component that gets rendered on these two pages.
Hi ,
If I understood correctly , both the forms reside in the same web domain. So you just need one Web tracking script and one form tracking script.
Where have you pasted the form JS script? In the CMS webpage or Google tag manager?
André Arnaud de Cal...
292,111
Super User 2025 Season 1
Martin Dráb
230,934
Most Valuable Professional
nmaenpaa
101,156