Skip to content

Capturing Google Ads Data in Contact Form 7

A Contact Form 7 submission can tell you more than a name and email. When the form carries campaign context, you can connect each lead to the Google Ads campaign, ad group and ad that brought the visitor in, then follow that lead through to customers and revenue. This guide walks through the four setup steps, shows why lead counts alone can point you at the wrong campaign, and gives you a field map for checking the result. The workflow described here follows {{OWNER_PRODUCT_NAME}}, the attribution tool the original walkthrough was written around; where a behavior is specific to that tool, the text says so.

Why lead counts alone can mislead

Consider a pool equipment business running two Google Ads campaigns: Pool Pumps and Pool Cleaners. If the only numbers available are spend, visitors and form completions, the two campaigns look identical on spend and the Pumps campaign appears stronger on volume. That reading can send more budget to the wrong place.

Add customers and revenue to the picture and the ranking can reverse. The comparison below is the supplied illustrative scenario; treat the figures as a worked example, not a benchmark for your account.

Use the legal directory table (table0001) for the spend, visitor and goal-completion view, and the legal directory table (table0002) for the fuller view that includes leads, customers and revenue.

In that scenario the Cleaners campaign wins on the measures that matter for growth:

  • It produced more customers (5 versus 2).
  • Its lead-to-customer conversion rate was five times higher (50% versus 10%).
  • Average customer value was higher ($5,000 versus $4,000).
  • Customer acquisition cost was lower ($400 versus $1,000).
  • Return on Ad Spend was three times higher.

The lesson is not that one campaign type is always better. It is that a form which records only that a submission happened cannot support this analysis. The form needs to carry the source of the lead so the later customer and revenue data can be joined back to it.

The four setup steps

The workflow has four stages: tag the ads, prepare the form, let Attribution Analytics fill the fields, and confirm the data arrives with the submission.

Step 1: Tag your Google Ads URLs

UTM parameters are appended to the destination URL so the visit carries a readable label. A plain destination such as https://roipaths.com/integrations/salesforce becomes a tagged URL when parameters are added, for example:

https://roipaths.com/integrations/salesforce?utm_medium=paidsearch&utm_source=google&utm_campaign=brand-campaign

The exact values are yours to choose, but a consistent convention for Google Ads makes later reporting far easier:

  • utm_medium: paid search
  • utm_source: Google
  • utm_campaign: the Google Ads campaign name
  • utm_term: the ad group name
  • utm_content: the specific ad

Free URL-building tools exist, and the important discipline is to apply the same convention across campaigns rather than improvising per ad.

Step 2: Add hidden fields to the Contact Form 7 form

Hidden fields give the campaign data somewhere to land without asking the visitor to type it. Add these six fields to the lead capture form:

  • Channel
  • Channel Drilldown 1
  • Channel Drilldown 2
  • Channel Drilldown 3
  • Landing Page
  • Landing Page Group

In Contact Form 7, a hidden field is added by placing a hidden field type into the form. The supplied help reference for adding hidden fields is available through the source registry link (link0013).

Step 3: Let {{OWNER_PRODUCT_NAME}} fill the fields

With the hidden fields in place, Attribution Analytics inspects how the visitor arrived and writes values into those fields when the form is submitted. The values come from the UTM parameters on the ad URL.

A worked example: a visitor arrives from a paid-search brand campaign. The fields would be populated as follows:

  • Channel = Paid search
  • Channel Drilldown 1 = Google
  • Channel Drilldown 2 = Brand campaign
  • Channel Drilldown 3 = Free account ad

Alongside the campaign values, Attribution Analytics also records the landing page (for example, dropbox.com/features/cloud-storage) and the landing page group (for example, features). That pairing lets you report at the section level and still drill into a single page.

Step 4: Confirm the data arrives with the submission

On submission, the Google Ads values travel with the details the visitor entered, such as name, company, phone and email. From there you can:

  • Include the values in each new-lead notification email so the source is visible immediately.
  • Pass them into a CRM so the wider team sees where the lead originated.
  • Build reports that connect campaigns to leads, customers and revenue.

A quick verification routine after setup: submit a test form from a tagged URL, open the resulting entry or notification, and check that all six fields are populated and that the values match the tags you used.

Field and control map

Use this map when checking that the form and Attribution Analytics agree on names and meaning.

FieldWhat it holdsExample
ChannelThe broad traffic typePaid search
Channel Drilldown 1The platform or sourceGoogle
Channel Drilldown 2The campaignBrand campaign
Channel Drilldown 3The ad or ad group levelFree account ad
Landing PageThe first page the visitor saw/features/cloud-storage
Landing Page GroupThe section that page belongs tofeatures

The form controls contract (form-controls-contract) is the authoritative reference for the exact control definitions; the table above is a reader aid, not a replacement for it.

Why a dedicated attribution tool helps

Raw UTM capture in a form works, but four practical problems tend to appear. Each has a matching check you can run before committing to a setup. The behaviors below are the ones the original walkthrough documents for Attribution Analytics; confirm them against your own configuration rather than assuming any attribution tool behaves the same way.

  1. Coverage beyond Google Ads. {{OWNER_PRODUCT_NAME}} records all traffic sources, so you can compare organic search, paid social and organic social alongside paid search. Check: can you report on non-Google channels from the same form data?
  1. Persistence across pages. Many simple methods need the UTM parameters on the page where the form is completed. If a visitor lands on an ad page, reads, then clicks through to a quote page and submits there, the tags can be lost. {{OWNER_PRODUCT_NAME}} stores the values in a cookie in the visitor's browser, so they remain available regardless of which page hosts the form. Check: submit a test form from a second page after landing on a tagged page.
  1. Cleaner values. Raw tags often arrive with inconsistent capitalization or domains, for example Google.com, google and adwords for the same source. That produces three separate rows that must be merged by hand. {{OWNER_PRODUCT_NAME}} recognizes those variations and assigns the lead to the correct channel regardless. Check: send test submissions with deliberately varied capitalization and confirm they group together.
  1. Landing-page context. Recording both the landing page and its group lets you see how a whole section performs and still zoom into an individual article or product page. Check: confirm both fields are populated and that the group value is stable across pages in the same section.

Putting it together

Tagging ads consistently, adding the six hidden fields, letting {{OWNER_PRODUCT_NAME}} populate them and verifying a test submission gives you a form that carries campaign context into every lead record. From there, reports can connect campaigns to customers and revenue rather than stopping at form completions. The same data also covers non-Google channels, so budget decisions rest on the full picture rather than one channel in isolation.

Get started

The original walkthrough closes with a free-trial offer for Attribution Analytics. The exact trial length and terms are set by the owner and are not asserted here.

Start your {{OWNER_TRIAL_TERMS}} free trial of Attribution Analytics.

Frequently asked questions

Do I need all six hidden fields?

The supplied setup lists six: Channel, Channel Drilldown 1, Channel Drilldown 2, Channel Drilldown 3, Landing Page and Landing Page Group. If you drop the landing-page fields you lose section-level reporting; if you drop the drilldowns you lose campaign and ad-level detail. Keep all six if you want the full picture.

What happens if a visitor submits the form on a different page from the ad landing page?

With a simple raw-UTM method, the tags can be lost because they are not present on the submission page. Attribution Analytics stores the values in a cookie in the visitor's browser, so the submission still carries the original campaign context.

Why do my reports show Google several times as a source?

Raw tags may arrive as Google.com, google or adwords for the same source, producing separate rows. Attribution Analytics groups those variants under one channel so you do not have to merge them manually.

Can I use this data outside email notifications?

Yes. The values can be passed to a CRM so the wider team sees the origin of each lead, and they can feed reports that connect campaigns to leads, customers and revenue.

Spend, visitors and goal completions by campaign (illustrative scenario)
Pool Pumps CampaignPool Cleaners Campaign
Spend$2,000$2,000
Visitors200100
Goal Completions2010

Illustrative example supplied with the original article; not a benchmark or a current performance claim.

Full-funnel view including leads, customers and revenue (illustrative scenario)
Pool Pumps CampaignPool Cleaners Campaign
Spend$2,000$2,000
Visitors200100
Leads2010
Customers25
Revenue$8,000$25,000

Illustrative example supplied with the original article; figures are not a forecast or a verified account result.