How to capture affiliate data in WPForms
Affiliate links bring visitors, but a plain form submission tells you nothing about which partner sent them. This guide walks through a four-step setup that attaches affiliate source details to every WPForms submission, then shows how to read that data once it is stored. You will also find a field map, a placement checklist and a short troubleshooting split for the common cases where the affiliate value arrives empty.
What the setup achieves
A form entry normally records the person: name, email, message. Adding affiliate context means the same entry also records the partner, the partner type, the specific campaign and the page the visitor first landed on. With that in place you can count leads per affiliate, follow them through to paying customers, and compare affiliate results against other acquisition channels.
The mechanism is deliberately simple. Affiliate links carry UTM parameters. A script stores those parameters in the visitor's browser. When the visitor submits a form, the stored values are written into hidden fields, and WPForms saves them alongside the visible answers.
Step 1: put UTM parameters on every affiliate link
Each link you hand to a partner should carry three UTM values. The suggested pattern separates the partner category from the individual partner:
- utm_medium identifies the program itself, for example affiliates.
- utm_source describes the kind of partner, such as bloggers, podcasters or youtubers.
- utm_campaign names the specific partner, for example john-smith.
A tagged destination looks like this: https://example.com/integrations/wpforms?utm_medium=affiliates&utm_source=bloggers&utm_campaign=john-smith. The medium marks the traffic as affiliate, the source records that a blogger sent it, and the campaign identifies which blogger.
You can choose different values, but keeping the three roles consistent across every partner is what makes later grouping possible. Affiliate platforms such as Trackdesk or Rewardful can append UTMs automatically, and a UTM builder can generate them from a template.
Step 2: add six hidden fields to your forms
Hidden fields are the receiving slots. Add these six to each form you want to attribute:
- Channel
- Channel Drilldown 1
- Channel Drilldown 2
- Channel Drilldown 3
- Landing Page
- Landing Page Group
WPForms supports hidden fields directly; the linked walkthrough covers the click path for adding them.
Step 3: let the stored UTM data fill those fields
When a visitor arrives through a tagged affiliate link, the parameters are saved in their browser rather than held only for that page view. They can browse elsewhere on the site, leave, and come back; the original values remain available.
At submission time those saved values are written into the hidden fields. This is the step that turns a browser-side record into form data you can query.
Step 4: WPForms saves the affiliate details with the entry
On submit, WPForms stores the visitor's answers and, in the same entry, the affiliate values that were placed in the hidden fields. From that point the data behaves like any other form field: it can be viewed, emailed, exported or forwarded.
Field map: which value lands where
The six hidden fields are not interchangeable. The first four describe the source hierarchy, and the last two describe the entry page. Use this map when naming matching properties in a CRM so that reporting groups correctly:
- Channel receives the top-level source category, which in the suggested pattern is the affiliate program itself (utm_medium, e.g. affiliates).
- Channel Drilldown 1 receives the partner type from utm_source, such as bloggers, podcasters or youtubers.
- Channel Drilldown 2 receives the specific partner from utm_campaign, such as john-smith.
- Channel Drilldown 3 holds a further detail level if your parameter structure uses one; the guide does not assign it a fixed value.
- Landing Page receives the first page the visitor viewed, for example https://example.com/blog/best-wordpress-addons.
- Landing Page Group receives the grouped version of that page, for example /blog.
Mapping each field to a distinct CRM property keeps the hierarchy intact, so a report can roll up from individual partner to partner type to program without re-parsing URLs.
Where should the captured data go?
There are four practical destinations, and they suit different questions:
- Entries in the WordPress dashboard: best for spot checks and small volumes. Each submission shows its affiliate values in the Entries area.
- Notification emails: best when someone needs to act on a lead immediately and wants the source visible in the inbox.
- Your CRM: best for anything involving customers, revenue or conversion rates, because those facts live there. Salesforce, HubSpot and Pipedrive are among the systems that can receive the data.
- A spreadsheet: best for quick charts. You can export via a WPForms add-on, a connector such as Zapier, or a CSV download from the dashboard, then move to a BI tool if the analysis grows.
A useful rule: if the question mentions money or closed customers, the data needs to reach the CRM. If it only mentions lead counts, entries or a spreadsheet will do.
Why browser-side memory matters
Attribution breaks when the source is read only on the landing page. A visitor who clicks an affiliate link, reads three other pages and then subscribes would look direct. Storing the parameters in the browser closes that gap.
Two further benefits follow from the same design. First, the same fields can hold non-affiliate sources such as paid search, paid social, organic social and organic search, so affiliate results sit next to other channels rather than in isolation. Second, the landing page and landing page group are captured too, which lets you see which content attracts converting visitors.
Three reports and the questions they answer
Once the data reaches a reporting tool, three views cover most affiliate questions:
- Leads by channel shows volume per source and lets you weigh the affiliate program against paid search or SEO.
- Customers by affiliate type breaks new customers down by partner category, such as bloggers, YouTubers, podcasters or social influencers, which supports decisions about where to recruit.
- Revenue by affiliate lists new customers and revenue per partner, which shows who is actually worth the commission.
Start with the question, not the chart. Volume questions belong in the first report; partner-mix questions in the second; value questions in the third.
When the affiliate value is missing
An empty affiliate field has three common causes, and they need different fixes:
- The link was never tagged. Check the URL the partner actually published for the three UTM values.
- The form lacks the hidden fields, or a field name does not match what the script expects. Re-check the six field names against the form.
- The visitor's browser no longer holds the stored values, for example because they cleared browser storage or opened the site in a different browser. Browser-side storage is per-browser, so it may not carry over in those cases.
Test with a tagged link in a fresh browser session before blaming the reporting layer.
A short pre-launch checklist
Before you announce the program, confirm each of these:
- Every partner link carries medium, source and campaign values, and the values follow one naming convention.
- All six hidden fields exist on every form that should be attributed, spelled exactly as listed.
- A test submission through a tagged link shows the expected values in Entries.
- Notification emails include the affiliate fields if anyone needs them on arrival.
- The CRM mapping is in place before you start collecting, so historical entries are not stranded.
- At least one report is built and shared with whoever owns the affiliate budget.
Closing
Affiliate tracking with WPForms comes down to three moving parts: tagged links, hidden fields, and a storage layer that remembers the first visit. Get those right and the reporting questions answer themselves.
| Hidden field | Value it receives | Typical example |
|---|---|---|
| Channel | Top-level source category | Affiliates |
| Channel Drilldown 1 | Partner type from utm_source | Bloggers |
| Channel Drilldown 2 | Specific partner from utm_campaign | John Smith |
| Channel Drilldown 3 | Further detail level if used | (varies by setup) |
| Landing Page | First page the visitor viewed | https://example.com/blog/best-wordpress-addons |
| Landing Page Group | Grouped version of that page | /blog |
The drilldown examples follow the suggested UTM pattern in this guide; the third drilldown level is not assigned a fixed value and depends on how you structure your own parameters.
| Destination | Best for | Limitation |
|---|---|---|
| WPForms Entries | Spot checks, low volume | Manual review only |
| Notification email | Immediate follow-up with source visible | Not reportable at scale |
| CRM (e.g. Salesforce, HubSpot, Pipedrive) | Customer counts, revenue, conversion rate, deal size | Requires field mapping |
| Spreadsheet export | Quick charts and basic visuals | Needs re-export to stay current |
Destination suitability reflects the uses described in this guide; actual connector availability depends on your WPForms plan and CRM configuration.
| Report | Question it answers | Grouping |
|---|---|---|
| Leads by Channel | How does affiliate lead volume compare with other channels? | Source channel |
| Customers by Affiliate Type | Which partner categories produce customers? | Partner type (bloggers, YouTubers, podcasters, influencers) |
| Revenue by Affiliate | Which individual partners generate customers and revenue? | Individual affiliate |
These are illustrative report shapes; the exact charts depend on the reporting tool and the fields you map.
Frequently asked questions
Do I need a separate form for affiliate traffic?
No. The same form serves all traffic. The hidden fields carry the source values, and visitors who arrive without a tagged link simply leave those fields empty or filled with another channel.
What happens if a visitor clicks two different affiliate links?
The setup stores the parameters from the visit that brought them in and keeps them available while they browse. If you need a strict rule about which click wins, decide it before launch and apply it consistently, because the form itself does not arbitrate between competing sources.
Can I use UTM values other than the suggested ones?
Yes. The three roles (medium, source, campaign) are a convention, not a requirement. What matters is that every partner link follows the same convention so that grouping works later.
Why does the affiliate field show nothing for some leads?
Most often the link was untagged, a hidden field is missing or misnamed, or the visitor's stored data was cleared. Test with a tagged link in a clean browser session to isolate the cause.
Can affiliate data reach my CRM automatically?
Yes, when the CRM is connected and the hidden fields are mapped to matching properties. Salesforce, HubSpot and Pipedrive are among the systems that can receive it.