Dynamics 365 UTM tracking in hidden marketing form columns
Add a few text columns to the Lead or Contact table, put them on your real-time marketing form as hidden fields, and TraceLead fills them with where the visitor first came from. The channel, source and campaign arrive in Dynamics 365 with the submission.
No card needed. No lead caps on any plan.
- Microsoft Dynamics 365 marketing forms: Documented pattern, not covered by an automated test
- How we test
Added by TraceLead's hidden fields. The name and email stay in your form.
- Channel
- Paid search
- Source / medium
- google / cpc
- Campaign
- brand-uk
- Click ID
- gclid
Dynamics 365 UTM tracking: why hidden columns stay empty
A hidden field on a marketing form holds only what something writes into it. Read the UTM tags from the address bar and you catch only the visitors who enquire on the page they landed on; the rest browse on and send the form from /contact, when the tags are gone.
Real-time marketing forms in Customer Insights – Journeys render into your page, so the inputs can be filled. What makes Dynamics different is the naming: every column carries your publisher prefix, so the mapping is set by hand rather than from a preset.
-
Monday
Clicks a Google ad, lands on
/pricing?utm_source=google&utm_medium=cpc&utm_campaign=brand-uk&gclid=…, leaves. -
Thursday
Types your address, opens
/contact, sends the marketing form.
| Hidden field | Read from the URL | Filled by TraceLead |
|---|---|---|
| tl_channel | empty | paid_search |
| tl_source | empty | |
| tl_utm_campaign | empty | brand-uk |
| tl_gclid | empty | Cj0KCQjw… |
| tl_landing_page | /contact | /pricing?utm_source=google&utm_medium=cpc |
TraceLead keeps the first visit in a first-party cookie on your own domain once your banner allows it, and fills the hidden columns on whichever page the form is sent from. The table uses tl_ names for clarity; in Dynamics each input carries the name of its column.
How to add a hidden field to a Dynamics marketing form
Two steps in Dynamics 365, one in your browser, one in TraceLead.
The full Dynamics 365 guide-
Create text columns on Lead or Contact
Add a text column for each value to the Lead or Contact table, for example TraceLead channel, TraceLead source and TraceLead campaign. Dataverse gives each one a logical name that starts with your publisher prefix.
-
Add them to the marketing form as hidden fields
In the real-time marketing form, add the new columns as hidden fields and publish the form on a page that also carries the TraceLead tag.
-
Copy each hidden input's name
Open the published page, inspect each hidden input in your browser's developer tools and copy its
nameattribute. -
Edit the mapping in TraceLead
On your site's page in TraceLead, edit the mapping for each field so its selector matches that name:
channel → input[name="<the name you copied>"] source → input[name="<the name you copied>"] -
Connect your cookie banner and test
Nothing is stored or filled until the visitor agrees. Pick your consent manager in TraceLead or call
tracelead('consent', true)from your banner, then visit with?utm_source=test&utm_medium=cpc, accept, send a test submission and open the record.
What arrives in Dynamics 365
A good first set of columns. Each holds a plain text value you can use in views, segments and reports.
Also available: utm_term, utm_content, the Google, Microsoft, Meta, LinkedIn, TikTok and X click ids and the referring site, each as another column and mapping row.
| Text column on Lead or Contact | Holds | Example |
|---|---|---|
| TraceLead channel | The channel the first visit came from | paid_search |
| TraceLead source | Where it came from | |
| TraceLead medium | How it came | cpc |
| TraceLead utm campaign | The campaign name from your UTM tags | brand-uk |
| TraceLead gclid | Google Ads click id, for offline conversion import | Cj0KCQjw… |
| TraceLead landing page | The first page seen, sensitive parameters removed | /pricing? |
| TraceLead first touch at | When the first visit happened | 2026-10-05T09:14:02Z |
Attribution without personal data. No names, emails, form values, IP addresses or user agents. Ever.
No privacy workarounds. Nothing before consent, no fingerprinting, no ad-blocker bypass, no cross-site identity.
Made in the UK. GBP pricing, UK consent rules in mind, and a person who answers email.
Questions, answered
Anything else? Email us and a person replies.
How do I add a hidden field to a Dynamics 365 marketing form?
Create a text column on the Lead or Contact table, add it to the real-time marketing form as a hidden field and publish the form. The hidden input is then part of the form on your page, ready for TraceLead to fill.
Can Dynamics 365 capture UTM parameters from the first visit?
The form can carry them in hidden columns; something has to fill those. TraceLead keeps the first visit's campaign, source and channel in a first-party cookie after consent and writes them into the hidden inputs when the visitor sends the form, on whichever page that is.
Why is there no Dynamics preset in TraceLead?
Dataverse prefixes each column's logical name with your publisher prefix, so the input names differ from one organisation to the next. Instead you copy each published input's name and set the mapping's selector by hand.
Which Dynamics forms does this guide cover?
Real-time marketing forms in Dynamics 365 Customer Insights – Journeys, which render into your page. Any form that renders inside a frame from another site cannot be filled by a script on your page.
Does TraceLead connect to Dynamics 365?
No. TraceLead keeps no Dynamics or Dataverse credentials and never writes to them. The snippet fills the hidden inputs in your page, and the marketing form sends them with the rest of the submission.
What happens before a visitor accepts cookies?
Nothing is stored and the hidden inputs stay empty until your consent banner says yes. The form submits either way.
Your next Dynamics 365 lead, with its first campaign.
Create the columns, add them to the form as hidden fields, copy the input names into TraceLead. Then send a test submission.
No card needed. Cancel any time.
Marketing form: hidden fields
TraceLead channel, TraceLead source, TraceLead campaign
TraceLead → site → mappings
channel → input[name="<the name you copied>"]
source → input[name="<the name you copied>"]