Skip to content

Track Instagram ad leads through Contact Form 7

Visitor counts alone do not show whether Instagram advertising produces enquiries, customers or revenue. This guide explains how to attach campaign information to each Contact Form 7 submission, so every lead can be traced back to the campaign, ad set and creative that brought the visitor to the site.

Why visitor analytics is not enough

Google Analytics can show that Instagram sent traffic, but it does not normally connect that traffic to individual form enquiries or later customer outcomes. For a non-ecommerce business, that leaves a gap between ad spend and pipeline. Capturing attribution at the moment of submission closes the gap: the enquiry itself carries its origin.

Four-step setup checklist

Work through these checks in order. Skipping the first step means there is nothing for later steps to record, and skipping the hidden fields means the data has nowhere to land on submission.

Step 1: Tag each ad URL

Add tracking parameters to the destination URL behind every Instagram ad. These parameters are extra text appended to the URL that record how the visitor arrived. A consistent naming convention matters more than the exact values: decide what each parameter means, then use it the same way on every campaign.

Parameter map

Use this mapping as a starting convention. Medium identifies the media type, source identifies the platform, and the remaining parameters drill down to campaign, ad set and individual creative.

Step 2: Install the snippet and add hidden fields

Install the attribution snippet on the website, then add hidden fields to each Contact Form 7 form. The snippet reads arrival information, stores it in a browser cookie, and writes it into those hidden fields when a form is completed. Because the data lives in a cookie, a visitor who browses, leaves and returns days later is still attributed to the original visit.

Hidden fields to add

Add five hidden fields to the form: Channel, Channel Drilldown 1, Channel Drilldown 2, Channel Drilldown 3 and Channel Drilldown 4. Channel gives the broad category, and each drilldown adds a level of detail beneath it.

Step 3: Attribution is stored and written into the form

Once installed, the snippet examines arrival signals such as tracking parameters, referring site and device, categorises the visit into a channel, and keeps that record in a cookie. On form submission it populates the hidden fields, so the attribution travels with the lead's name, email and phone number rather than sitting in a separate analytics report.

Step 4: Decide where to view the data

Choose where the captured data should be visible. Contact Form 7 does not store submissions by itself, so a storage plugin such as Flamingo is needed to view submissions in the WordPress dashboard. Alternatively, include the fields in notification emails, or pass them to a CRM such as HubSpot, Salesforce or Pipedrive for reporting on leads and customers by campaign.

What gets captured

Two kinds of information are captured. Channel data records how the lead arrived and what content attracted them. Landing page data records the first page the visitor reached and its category, which makes it possible to compare lead volume across site sections such as a blog and to identify which individual pages generate the most enquiries.

Worked example: a fencing business

Consider a fencing business promoting residential fencing on Instagram. A visitor clicks an ad, lands on a page and submits the contact form. The captured values might read: Channel: Paid Social; Channel Drilldown 1: Instagram; Channel Drilldown 2: the residential fencing campaign name; Channel Drilldown 3: the timber fence creative that was clicked. The landing page and its category are recorded alongside, so the business can see both which ad produced the lead and which page converted it.

Why capture every channel, not just Instagram

The snippet categorises every form submission, not only Instagram traffic, using channel categories comparable to those in Google Analytics, including Paid Social, Paid Search and Organic Search. It also tolerates inconsistent parameter naming, so variations in source values are still assigned to the correct channel. That means one setup supports reporting across paid social, paid search, search optimisation and other sources.

Three reports to run

Three reports are especially useful once attribution reaches a CRM or spreadsheet. Leads by channel gives a high-level view of what drives enquiries; if most leads come from Organic Search while most budget goes to Instagram, spending may need rebalancing. Leads by network compares Meta properties such as Facebook, Instagram, Messenger and WhatsApp, showing which network actually produces enquiries. Leads by campaign shows monthly lead volume per campaign, separating campaigns that generate real enquiries from those that only generate impressions and clicks.

Wrap up

Tag the ad URLs, install the snippet, add the hidden fields and test a submission before judging performance. With attribution attached to each enquiry, Instagram advertising can be evaluated on leads and customers rather than clicks alone.

UTM parameter map for Instagram ads
ParameterWhat to record
UTM MediumPaid social
UTM SourceInstagram
UTM CampaignCampaign name
UTM TermAd set name
UTM ContentSpecific ad

Convention as captured in the source; adopt one consistent convention across all ads.