
When an inquiry arrives, a useful first question is which campaign brought the visitor to the form. UTM parameters can preserve that context alongside a Contact Form 7 submission, provided you define what the captured values actually represent. A source label attached to an inquiry is useful evidence, but it is not automatically a complete attribution model.
This guide covers a simple, documented approach: capture parameters from the URL of the page containing the form. It does not require adding a separate analytics product to CF7. It also does not preserve campaign values across later page visits unless you deliberately build and test that additional behavior.
Decide what your campaign fields mean
Start with three fields: source, medium and campaign. For example, a newsletter link might identify the source as your newsletter, the medium as email and the campaign as an autumn consultation offer. Google’s campaign URL documentation explains these parameters and the importance of consistent values.
Write a small naming convention before publishing links. Use the same spelling and capitalization across people and channels. If one person uses newsletter and another uses Newsletter, the receiving systems may treat them as different values. Keep a campaign register containing the destination URL, intended labels, launch date and owner.
Do not place names, email addresses or message contents in campaign parameters. URLs can appear in browser history, logs and other systems. Campaign labels should describe the promotion or channel, not identify the person receiving the link.
Add hidden fields with URL defaults
Contact Form 7 supports hidden form fields, whose values travel with the submission without displaying an input to the visitor. Its default-value documentation explains that default:get reads the matching URL query parameter.
In the form’s Form tab, add these example tags, adapting names only if you also adapt the parameter and destination mapping:
[hidden utm_source default:get]
[hidden utm_medium default:get]
[hidden utm_campaign default:get]
Then open the page containing that form using a tagged URL. Replace the example domain and path with your real form page:
https://example.com/contact/?utm_source=newsletter&utm_medium=email&utm_campaign=autumn_consultation
The tags above describe the current form-page URL. They do not independently inspect a previous landing page or retrieve campaign history. That boundary is useful: the implementation is small enough to explain, and its limitations can be tested before anyone relies on the resulting report.
Carry the values into the working record
Add the corresponding mail-tags to the notification body if the team needs to see campaign context in email:
Campaign source: [utm_source]
Campaign medium: [utm_medium]
Campaign name: [utm_campaign]
If inquiries are stored locally or sent to another destination, map the same fields there and verify the resulting record. Do not assume a connector includes new hidden fields just because the email contains them. Our Google Sheets guide explains field mapping, while the Notion workflow covers a different destination.
Choose one retained record as the reporting source and document its field names. If a staff member edits the business status of an inquiry, preserve the originally captured campaign values separately. Changing a contact’s latest source every time they return can make older inquiries appear to belong to a campaign that had not started when they arrived.
Run four acceptance checks
- Tagged direct visit: open the tagged form-page URL, submit a synthetic inquiry and check all three values in the destination.
- Untagged visit: open a clean URL in a separate session and confirm that it does not inherit the previous visitor’s labels.
- Different campaign: repeat with a second set of labels and confirm that the new record is distinguishable.
- Navigation before submission: enter through a tagged landing page, then navigate normally to the form and inspect which values remain.
The fourth test often exposes the central limitation: ordinary navigation may reach a form URL without those parameters. The simple hidden-field method then has no campaign value to read. Record this as missing captured context rather than replacing it with a guessed source.
Repeat the checks with your site’s cache and optimization configuration active. Inspect the hidden inputs in the browser and the final saved record. A cached page, redirect or link rewrite can change the path by which a visitor reaches the form. Test the real route instead of assuming that a successful uncached preview proves the production behavior.
Choose persistence deliberately when you need it
If visitors commonly read several pages before contacting you, a same-page capture method may leave too many inquiries unattributed. Before choosing a persistence plugin or custom implementation, specify whether you want the first observed campaign, the most recent campaign or both. Define how long the value should remain available and what happens on an untagged return visit.
That is a separate implementation project, with storage, consent and expiration choices appropriate to your site. It should include tests for multiple tabs, a new campaign visit and a cleared browser session. Do not add a persistence script merely to make every row non-empty; a filled field can still be misleading when its meaning is undocumented.
Captured values are supplied through the visitor’s URL and can be changed. Use them for reporting context, not access decisions, discounts or proof that a particular advertising platform verified the lead. Normalize known campaign names for analysis while retaining enough original context to investigate unexpected values.
Report campaign inquiries without overstating attribution
A count of retained inquiries labeled newsletter is not the same as the number of unique newsletter visitors who converted. Repeat submissions, missing parameters and different analytics collection rules can produce different totals. Keep an “unknown or not captured” category visible rather than silently removing those inquiries from the report.
For a visitor-based conversion rate, use a matched numerator and denominator as described in our conversion-rate guide. For operational reporting, the campaign label can still help answer which messages need follow-up and which campaigns produced inquiries the team considers useful.
Use Svetlik Analytics for Contact Form 7 for its documented submission-trend dashboard when that fits your reporting needs. UTM capture and destination mapping in this guide are separate CF7 configuration steps; they are not a claim that the free analytics plugin supplies campaign persistence or attribution reporting.
