Skip to content

Capture Google Analytics Data in Contact Form 7

A form submission tells you who contacted you and what they asked for. It does not, on its own, tell you which channel, campaign or landing page brought that person to your site. Capturing attribution data in Contact Form 7 connects those two pieces, so each lead can later be traced through to an opportunity, customer or payment.

Why form submissions need attribution data

Google Analytics is useful for seeing how visitors arrive, but arrival data stays separate from a lead unless it is deliberately attached to the submission. The practical fix is to place attribution values inside the form itself, using hidden fields that the visitor does not see or edit. When the form is sent, those values are stored alongside the name, email address and message, creating a single record that can be analysed later.

Use this checklist before you start:

  • Confirm the attribution script is installed on the site
  • Add all six hidden fields to every Contact Form 7 form you want to measure
  • Check the field names match the values your CRM or reporting tool expects
  • Submit a test form from a known campaign link and verify the fields are populated
  • Connect the form to your CRM, billing or email tool and confirm the attribution fields arrive there

Four steps to capture the data

Step 1: Add the hidden fields. Each form needs Channel, Channel Drilldown 1, Channel Drilldown 2, Channel Drilldown 3, Landing Page and Landing Page Group. Channel gives the broad source, such as Paid Search. The three drilldown fields add progressively finer detail, such as the search engine, campaign and ad. Landing Page records the first page the visitor reached, and Landing Page Group records its category, such as a blog or features section.

Step 2: Let the attribution script fill them in. The script tracks incoming traffic, groups each visitor into a channel and stores the result in a browser cookie. It also records the first landing page and its group. No visitor input is required.

Step 3: Capture the values on submission. When the visitor sends the form, Contact Form 7 receives the visible answers together with the hidden attribution values.

Step 4: Pass the record onward. Plugins can connect the submission to a CRM, billing system, email marketing tool or other sales tool. Once there, the data can be used to compare channels by leads, opportunities, customers and revenue.

Worked example: paid search versus organic search

Consider a visitor who arrives through a paid search brand campaign and lands on a features page. The hidden fields might record Channel as Paid Search, Channel Drilldown 1 as Google, Channel Drilldown 2 as Brand Campaign and Channel Drilldown 3 as the brand name, with Landing Page set to the features URL and Landing Page Group set to Features. If that visitor then submits the form, the CRM record shows both the contact details and the exact route that produced them.

A different pattern appears for organic traffic. A visitor who finds the site through a search engine might be recorded as Organic Search, with the search engine in the first drilldown, the referring domain in the second and the keyword, where available, in the third. Comparing the two patterns shows why the drilldown fields matter: the broad channel alone cannot distinguish a brand campaign from a generic paid campaign, or one search engine from another.

Landing-page data adds a second dimension. A landing page under a blog path can be grouped as blog content, while a features page is grouped as product content. Reporting by group reveals which content categories turn visits into leads, rather than only which channels do.

Three reports to run once the data is in your CRM

Leads by Channel: Group submissions by the Channel field and review the monthly count for each channel. If one channel produces most leads while most of the budget goes elsewhere, that mismatch is a prompt to reallocate time and spend.

Opportunities by Google Ads campaign: Use the drilldown fields to break opportunities down by individual campaign. Campaigns that create opportunities worth pursuing deserve further investment; campaigns that generate only low-quality enquiries can be reduced or rewritten.

Customers by Facebook Ads network: Where ads run across several networks owned by the same parent company, break customers down by network. Networks differ in format and intent, so the network with the strongest customer results is the best candidate for more spend.

Together, these three views answer different questions: which channel creates demand, which campaign creates sales-ready interest, and which network creates paying customers.

Wrap up

Attribution capture works best when it is treated as part of the form, not as an afterthought. Add the six hidden fields, install the tracking script, test a submission from a known campaign, and confirm the values reach your CRM before relying on the reports. That sequence turns every form submission into a record of where the lead came from and what content brought them there.

Hidden fields to add to Contact Form 7
FieldWhat it recordsExample use
ChannelBroad marketing channelPaid Search, Organic Search, Paid Social
Channel Drilldown 1First level of channel detailSearch engine or platform, such as Google
Channel Drilldown 2Second level of channel detailCampaign name or referring domain
Channel Drilldown 3Third level of channel detailAd, keyword or specific referring domain
Landing PageFirst page the visitor reachedFull URL of the entry page
Landing Page GroupCategory of the entry pageBlog, Features or another content group

Field names and example values are taken from the captured source; exact field names must be confirmed against the owner's form and CRM configuration before publication.

Frequently asked questions

Why does Google Analytics alone not show which channel created a lead?

Google Analytics on its own shows which channels bring visitors to the site. It does not automatically attach that channel information to a lead when the visitor submits a form. Adding hidden fields that are filled with channel and landing-page data closes that gap, so the submission itself carries its source.

Which hidden fields should a Contact Form 7 form contain?

Six fields are needed: Channel, Channel Drilldown 1, Channel Drilldown 2, Channel Drilldown 3, Landing Page and Landing Page Group. The first four describe the marketing channel in increasing detail; the last two record where the visitor first arrived and how that page is grouped.

How does the attribution data reach the form?

A small site script, similar in placement to a Google Analytics tag, tracks incoming traffic, groups visitors into channels such as Paid Search, Organic Search and Paid Social, and stores that information in browser cookies. When a form is submitted, the stored values are written into the hidden fields and travel with the contact details.

What happens after a visitor submits the form?

Once the fields are populated, the form submission contains both the visitor's answers and the attribution values. Plugins can then pass the combined record to a CRM, billing system, email marketing tool or other sales tool, where it can be reported against leads, opportunities, customers and revenue.