Capture LinkedIn Ads Data in Contact Form 7
LinkedIn Ads can bring visitors to your site, but a visit count does not tell you which campaigns produce leads, customers or revenue. This guide shows how to attach campaign and ad context to every Contact Form 7 submission and carry it into a CRM so you can report on outcomes, not just clicks.
What you are actually trying to capture
The goal is to make each Contact Form 7 submission self-describing. When a lead arrives from a LinkedIn ad, the form submission should carry the channel (for example, Paid Social), the source (LinkedIn), the campaign name, the ad name, the landing page URL and the landing page category. Those values then travel with the lead into your CRM, where they become report dimensions.
A useful mental model is a three-layer stack:
- Ad layer: UTM parameters on the LinkedIn ad destination URL identify the campaign and ad.
- Persistence layer: a small script stores those values in the visitor's browser so they survive navigation between pages.
- Form layer: hidden fields in Contact Form 7 receive the stored values at submission time.
If any layer is missing, the chain breaks. Ads without UTMs produce no campaign detail. A persistence layer that only reads the current URL loses the data when the visitor converts on a different page. A form without hidden fields captures nothing even when the first two layers work.
Step 1: Put UTM parameters behind your LinkedIn ads
Add UTM parameters to the destination URL of every LinkedIn ad you run. The exact values are your choice, but a consistent scheme makes reporting far easier. A practical starting set:
utm_medium=paidsocialutm_source=linkedinutm_campaign=[campaign name]utm_term=[ad name]
Keep the naming stable across campaigns. If one ad uses PaidSocial and another uses paid-social, your reports will split the same channel into two rows. Free UTM builder tools are widely available if you prefer to generate the URLs rather than type them.
A quick check before moving on: open each ad's destination URL in a browser and confirm the parameters appear in the address bar exactly as intended.
Step 2: Install the attribution script on your site
The attribution layer is a snippet of code placed on your website. It watches how visitors arrive, groups them into channels comparable to those in Google Analytics (Paid Search, Paid Social, Organic Search, Organic Social and so on), and stores the result in a cookie in the visitor's browser.
When a visitor later submits a form, the script writes the stored attribution values into hidden fields you have added to that form, and Contact Form 7 captures them with the rest of the submission. Installation is typically a short task with step-by-step instructions available from the tool's help documentation.
Before relying on it, confirm two things: the snippet is present on every page where a form can be submitted, and the cookie is being set after a visit from a tagged ad URL.
Step 3: Let Contact Form 7 capture the values
Once the script and the hidden fields are in place, each submission should include the visitor's attribution details: which LinkedIn campaign they came from, which ad they clicked, and the landing page information. You can then use WordPress plugins that integrate with Contact Form 7 to forward those values to your CRM and other tools.
A field/control map helps here. Treat each captured value as a named field with a single meaning:
- Channel — the broad category, such as Paid Social.
- Source — the platform, such as LinkedIn.
- Campaign — the campaign name from your UTM string.
- Ad / term — the specific ad identifier.
- Landing page — the full URL of the first page the visitor saw.
- Landing page category — the section of the site, such as
/blog.
Map each of these to a matching CRM field. If a field has no destination, the value is captured but never reportable.
Step 4: Report on performance, not just clicks
With the data in your CRM, you can build reports that answer commercial questions rather than traffic questions. Common report shapes include:
- Number of leads from LinkedIn Ads overall.
- Leads broken down by each campaign.
- Customers generated, by campaign.
- Revenue attributed to LinkedIn Ads.
These reports turn ad data into budget decisions. A campaign that produces many leads but few customers looks different from one that produces fewer, higher-value customers, and only the CRM-side view shows that difference.
Why cookie-based capture beats same-page-only capture
A common shortcut is to read UTM parameters from the URL at the moment the form is submitted. That works only when the visitor converts on the same page they landed on. If someone clicks a LinkedIn ad, lands on your homepage, then navigates to a Contact Us page and submits the form there, the original URL parameters are gone and nothing is captured.
A cookie-based approach changes the outcome. The parameters are stored on arrival and read at submission time, so the form can be on any page. The distinction matters most for multi-page sites where the ad landing page is rarely the conversion page.
A simple test: click a tagged ad URL, navigate to a different page, submit a test form, and check whether the campaign and ad values appear in the submission.
Worked example: a visitor who converts on a different page
Suppose a visitor clicks a LinkedIn sponsored content ad. The destination URL carries utm_source=linkedin, utm_medium=paidsocial, utm_campaign=q4-demo and utm_term=carousel-a. They land on the homepage, read a blog post, then click through to the contact page and submit the form.
With cookie-based capture, the submission carries Paid Social as the channel, LinkedIn as the source, q4-demo as the campaign, carousel-a as the ad, the homepage as the landing page and / as the landing page category. With same-page-only capture, the submission carries none of those values because the contact page URL has no UTM parameters.
The same example also shows why landing page data is useful on its own. Even when the campaign is identical, knowing whether visitors landed on the homepage or a specific blog post tells you which entry points are doing the work.
Three report designs worth building
1. Leads by channel. Because the attribution layer captures every channel, not only LinkedIn, this report shows how Paid Social compares with Organic Search, Paid Search and Organic Social. It answers where leads come from overall and supports budget allocation across channels.
2. Customers by campaign. When you run several LinkedIn campaigns, this report breaks customers down by the campaign they came from. It answers which campaigns are producing customers and which should be scaled or stopped.
3. Revenue by ad type. LinkedIn offers sponsored content in the newsfeed, sponsored messaging such as InMail ads, and text ads in the sidebar. If you use a mix, a revenue-by-ad-type report shows which format is producing revenue and helps concentrate budget on the formats that work.
Pre-launch checklist
- Every LinkedIn ad destination URL includes
utm_source,utm_medium,utm_campaignandutm_term. - Naming conventions are consistent across campaigns and ads.
- The attribution snippet loads on every page that hosts a form.
- Hidden fields for channel, source, campaign, ad, landing page and landing page category exist in the Contact Form 7 form.
- Each hidden field is mapped to a matching CRM field.
- A test submission from a tagged URL, made on a different page from the landing page, shows the expected values.
- At least one report is built in the CRM before spend scales.
Frequently asked questions
Do I need UTM parameters if I only run LinkedIn Ads?
Yes. Without UTM parameters there is no campaign or ad identifier for the form to capture. The attribution layer can still classify the channel, but you lose the campaign and ad detail needed for per-campaign reporting.
What happens if a visitor submits a form on a different page from the one they landed on?
With cookie-based capture, the original campaign and ad values are still passed through at submission time. With same-page-only capture, those values are lost because the conversion page URL does not contain the original UTM parameters.
Can I report on channels other than LinkedIn?
Yes. The attribution layer classifies visitors into channels such as Paid Search, Paid Social, Organic Search and Organic Social, so a leads-by-channel report can compare LinkedIn against your other acquisition sources.
What landing page information is captured alongside the campaign?
The full landing page URL and the landing page category (for example, /blog) are captured. This lets you report on which sections of the site and which individual pages generate leads, customers and revenue.
How do I get the captured data from Contact Form 7 into my CRM?
WordPress plugins that integrate with Contact Form 7 can forward the hidden field values to your CRM and other tools. The key requirement is that each hidden field is mapped to a matching CRM field so the values become reportable.