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,...
Answered

Embedded Forms and Query Strings

(0) ShareShare
ReportReport
Posted on by 5

Hi there

We have an Embedded Marketing form on the Contact Us page of our site. We want to be able to capture the previous url that the visitor was on before they clicked Contact Us and have that URL written back to CRM in a text field.

Example, if they were on the careers page the field would have www.mysite.com/careers and a product maybe www.mysite.com/products/t-shirt.htm 

I have searched this forum but i am unsure of the terminology so any guidance would really help

Thank you.

I have the same question (0)
  • Verified answer
    Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at

    Hello Mark,

    You can use document.referrer property, which returns the last visited page URL.  

    you can add a hidden field on the marketing form and Javascript to fill this field using document.referrer and map that hidden field to CRM field.

    learn.microsoft.com/.../marketing-form-client-side-extensibility

    www.geeksforgeeks.org/.../

  • MarkSmith5896 Profile Picture
    5 on at

    Hi Naveen,

    This is great advice and it worked perfectly.

    Thank you.

    Mark

  • Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at

    Great. Good to hear that it helped :)

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 184 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 138

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans