Capture Google Analytics data in Gravity Forms
Google Analytics can show how visitors reached a site and whether goals converted, but that alone does not show which channels later produced deals, customers or revenue. Storing channel and landing-page context on each form submission closes that gap: the lead record itself carries the marketing origin, so downstream reporting can follow it through the pipeline.
How the capture works
A small site script examines technical signals similar to those Google Analytics uses, classifies the visit into a standard channel such as Organic Search, Paid Search or Paid Social, and stores that classification in a browser cookie. When the visitor later submits a form, the script writes the stored channel and landing-page details into hidden form fields. Gravity Forms then saves those values beside the submitted name, email and other answers, and its integrations can forward the whole record to a CRM, email tool or analytics system.
Four-step setup checklist
- Add six hidden fields: Channel, Channel Drilldown 1, Channel Drilldown 2, Channel Drilldown 3, Landing Page and Landing Page Group. Gravity Forms offers a Hidden field type, or another field can be made hidden with its visibility setting.
- Let the attribution code populate them. At submission it fills the fields automatically; no visitor input is needed.
- Gravity Forms stores the completed values with the rest of the submission.
- Forward and report. Use a native integration or a tool such as Zapier to send the record to a CRM, then build channel and campaign reports there.
Worked example: a branded search visit
Consider a visitor who arrives through a branded Paid Search campaign and first opens a features page. The fields would read: Channel = Paid Search; Drilldown 1 = Google; Drilldown 2 = Brand Campaign; Drilldown 3 = the brand name; Landing Page = the features URL; Landing Page Group = Features. That single record lets a marketer distinguish the paid route from the content that attracted the visit, and lets a sales team see both without opening a separate analytics report.
Channel versus landing page
Channel data records the route in, with drilldowns adding detail such as ad group, keyword and campaign for Paid Search. Landing-page data records the first page seen and its category, so all posts in a blog, for example, can be totalled together and then broken down post by post. Keeping the two dimensions separate prevents a common reporting error: crediting a channel for what was really the appeal of a particular page, or vice versa.
Four reports to build first
Leads by Channel shows monthly volume per route, helping budget decisions when spend and results diverge. Opportunities by Google Ads campaign shows which campaigns produce genuine sales opportunities rather than low-quality leads. Customers by Facebook Ads Network separates results across Facebook, Instagram, Messenger and WhatsApp placements. Revenue from Organic Search by search engine connects SEO effort to revenue and shows which engine drives it. In each case the form-captured fields are the join key between marketing activity and pipeline outcomes.
| Field | What it records | Use it to answer |
|---|---|---|
| Channel | Standard marketing channel, e.g. Paid Search | Which route brought the lead in? |
| Channel Drilldown 1–3 | Progressively finer detail, e.g. network, campaign, brand | Which specific campaign or source? |
| Landing Page | First page the visitor saw | Which page attracted them? |
| Landing Page Group | Category of that page, e.g. Blog or Features | Which content type performs overall? |
Field names as listed in the source setup steps; exact labels should match the owner's form configuration.
Frequently asked questions
What do I need to add to a Gravity Forms form?
Add six hidden fields for Channel, three Channel Drilldown levels, Landing Page and Landing Page Group. The attribution code then fills them at submission, Gravity Forms stores them with the visitor's details, and an integration forwards them onward.
What is the difference between Channel and Landing Page data?
Channel answers how a visitor arrived, such as Organic Search or Paid Social. Landing Page answers which page first attracted them, such as a blog post or features page. Together they separate acquisition route from the content that prompted the visit.
What reports become possible after capture?
Once the fields reach a CRM or spreadsheet, you can group leads by channel, opportunities by campaign, customers by ad network, and revenue by search engine. Those views connect earlier marketing activity to later pipeline and revenue outcomes.