Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

Add javascript to event registration forms

Posted on by 15
We want to populate a real-time marketing event registration form with values collected from URL (utm-parameters), using a script similar to this Microsoft example: https://learn.microsoft.com/en-us/dynamics365/customer-insights/journeys/real-time-marketing-manage-forms#example-2-populate-a-hidden-field-with-a-utm-parameter-value-from-a-url. The script works as expected for /standard/ realtime Marketing forms, but the script seems to be ignored when we add it to the event registration form. Bth the event registration form and the other marketing form is published as standalone pages. 
Any ideas on how to solve this?
  • Venke Borander Profile Picture
    Venke Borander 15 on at
    Add javascript to event registration forms
    @Pauline: Thank you for looking at the issue! I experience exactly the same. No trace of the script in the console, even for the simplest scripts (tried adding a "hello world!" script for debugging). As we are not using Power Pages, I think we want to avoid that for the time beeing, and rather see what support says. 
     
    @Daniel. The script is placed at the bottom of the head-section, above the </head> tag. The script is not deleted, but simply ignored. The script works perfectly on RTM Marketing forms, but not on a RTM event registration form. Is it a RTM event registration form you've tested on? 
     
     
    Best regards,
    Venke 
     
  • Add javascript to event registration forms
    Hi Venke,
    in which part of the email did you add the script? In the past I was able to add scripts where I want and just added a "script part" at the end of the form. At this moment these scripts are deleted during saving process automatically, but placing them into the header worked fine for me.
     
     
    Best regards,
    Daniel
  • PaulineKolde Profile Picture
    PaulineKolde 635 Super User 2024 Season 2 on at
    Add javascript to event registration forms
    Hi Venke, 
     
    I have tried it out as well now and i experience the same issue. The script is not deleted in the html but it is simply ignored when opening the form on the browser. I also cannot find the script in the developer console of the browser. Maybe it is a bug and you should create a support ticket? I don't think it should work that way.
    Or have you tried with Power Pages?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans