Contact Form 7

Contact Form 7 Attribution Tracking

Stop guessing where your WordPress leads come from. AttributionHub captures the full marketing journey — source, campaign, keyword, landing page — and writes it into every Contact Form 7 submission automatically.

Why Your CF7 Leads Need Attribution Data

Contact Form 7 is the most widely used WordPress form plugin, powering millions of websites. It's lightweight, reliable, and does exactly what it's supposed to do — collect form submissions.

But here's what it doesn't do: tell you where those leads came from.

When someone fills out your contact form after clicking a Google Ad, there's nothing connecting that lead back to the campaign. Your sales team sees a name, an email, and a message. Your marketing team sees a conversion number in Google Analytics. The two never meet.

AttributionHub bridges this gap. It tracks each visitor's marketing source — UTM parameters, referrer, landing page, channel — and writes that data into hidden fields on your CF7 forms. When the form submits, the attribution data goes along with it.

What Data Gets Captured

UTM Parameters

Source, medium, campaign, term, and content — captured from incoming URLs and attached to the form submission.

Landing Page & Referrer

Which page the visitor first landed on and where they came from, so you can trace the complete path to conversion.

Channel Classification

Each lead is automatically tagged as Paid Search, Organic, Social, Email, Direct, or Referral — no manual work needed.

First Touch & Last Touch

Track both the original discovery source and the final touchpoint before conversion, even across multiple sessions.

How It Works

Setting up attribution tracking with Contact Form 7 takes about five minutes. No PHP code, no additional plugins, no server configuration.

Step 1: Add the AttributionHub Script

Add the tracking snippet to your WordPress site header. Use your theme's header settings, a plugin like Insert Headers and Footers, or Google Tag Manager:

<script src="https://cdn.attributionhub.com/attribution.js?id=YOUR_ID" async defer></script>

Step 2: Add Hidden Fields to Your CF7 Form

In the Contact Form 7 editor, add hidden fields using CF7's shortcode syntax:

[hidden ah_channel]
[hidden utm_source]
[hidden utm_medium]
[hidden utm_campaign]
[hidden utm_term]
[hidden ah_landing_page]
[hidden ah_referrer]

AttributionHub automatically detects CF7 forms and populates these hidden fields with the visitor's attribution data.

Hidden Field TagWhat It CapturesExample Value
[hidden ah_channel]Marketing channelPaid Search
[hidden utm_source]Traffic sourcegoogle
[hidden utm_medium]Traffic mediumcpc
[hidden utm_campaign]Campaign namespring-sale-2025
[hidden utm_term]Search keywordwordpress contact form
[hidden ah_landing_page]Entry page/services
[hidden ah_referrer]Referring sitefacebook.com

Step 3: Update Your Mail Template

Add the attribution mail tags to your CF7 email template so the data appears in notification emails:

Channel: [ah_channel]
Source: [utm_source]
Campaign: [utm_campaign]
Landing Page: [ah_landing_page]

Step 4: Test With a Real Submission

Visit your site with UTM parameters and submit a test form:

https://yoursite.com/contact?utm_source=google&utm_medium=cpc&utm_campaign=spring-sale

Check your email — the attribution fields should be filled in.

For complete setup details, see the Contact Form 7 integration guide.

Use Cases

Small Business Websites — If CF7 handles your main contact form, you can finally see whether leads come from Google, social media, or referrals — and adjust your marketing budget accordingly.

WordPress Agencies — Track which campaigns generate leads for each client site. Attribution data in form submissions makes monthly reporting straightforward.

Content Marketing — Discover which blog posts generate the most form submissions. Knowing the landing page and referrer for every lead helps you double down on content that converts.

Local SEO — Track whether leads come from organic local searches, Google Maps, or paid local campaigns. The source and landing page data tells the story.

What Makes AttributionHub Different

AJAX Submission Support

CF7 submits forms via AJAX by default. AttributionHub listens for the wpcf7mailsent event, so attribution works seamlessly with AJAX submissions.

No Plugin Conflicts

One script tag handles everything. No WordPress plugin to install means zero compatibility issues with themes or other plugins.

Works Without Cookies

First-party data storage means attribution tracking works even when third-party cookies are blocked or visitors decline consent.

Flamingo Compatible

If you use Flamingo to store CF7 submissions in your WordPress database, attribution data is captured right alongside the rest of the form data.

Frequently Asked Questions

Does this work with CF7 AJAX submissions?

Yes. Contact Form 7 uses AJAX by default and AttributionHub is built to work with it. Hidden fields are populated before the AJAX request fires.

Will attribution data appear in Flamingo?

Yes. Flamingo stores all form field data, including hidden fields. Attribution values will appear in your Flamingo inbox entries alongside the visible form fields.

Can I use this with other WordPress form plugins?

Absolutely. AttributionHub works with Gravity Forms, WPForms, Ninja Forms, Formidable Forms, and any form that supports hidden fields.

Does it slow down my WordPress site?

No. The script is under 10 KB, loads asynchronously, and has no impact on Core Web Vitals scores.


Start Tracking Your Contact Form 7 Leads

Set up attribution tracking in under 5 minutes. See which campaigns, channels, and keywords drive form submissions on your WordPress site.

Get Started Free
Loading footer...