Capture Google Analytics Data in Ninja Forms
Website visits alone do not show which campaigns create leads, opportunities, or revenue. By adding hidden fields to Ninja Forms and populating them with channel and landing-page data, you can send that context to your CRM alongside the contact details a visitor submits, then report on performance by channel, campaign, and content.
How the data flows
A small site script scans each visit for details such as the landing page and marketing channel, then stores those details in the visitor's browser as cookies. When the visitor later submits a Ninja Forms form, the stored values are written into hidden fields on that form. On submission, the hidden-field values travel with the name, email, phone number, and other details the visitor entered, so the receiving system gets both the lead and its origin.
Step 2: Let the tool populate the fields
Once the fields exist, the tool fills them automatically from the visit data. Consider a visitor who clicks a paid search ad, lands on a features page, and requests a demo. The channel fields would show Paid Search, the search engine, the campaign, and the advertiser, while the landing-page fields record the exact page and its group. The precise values depend on how the campaign was configured.
Step 3: Capture on submission
When the visitor submits the form, Ninja Forms captures the hidden-field values together with the visible answers. That combined record is what you forward onward, so attribution context is never separated from the contact it belongs to.
Step 4: Send data onward and report
Configure Ninja Forms to send submissions to your CRM or other marketing tools. Native add-ons are described for Salesforce, HubSpot, Zoho CRM, and Insightly, and a connector such as Zapier can forward data to many other tools. In the receiving system you can then compare channels by lead volume, conversion to deal or opportunity, closed-won deals, revenue, and return on investment.
What the captured data tells you
Two questions drive the reporting. Channel asks how the visitor arrived, using categories such as Organic Search, Paid Search, Paid Social, and Referral. Landing Page asks which content they first saw, such as a features page, blog post, or ebook. Channel drilldowns add detail such as campaign, ad group, and keyword for paid search visits. Landing-page data pairs the exact URL with its page group, so you can compare whole site sections and individual pages in CRM reports.
Pre-publish checklist
Before you publish: confirm all six hidden fields are labeled exactly as required on every form you want to track; submit a test form from a known campaign and check that channel and landing-page values arrive in your CRM; and verify that reports group by channel and landing page rather than by contact alone.
| Hidden field label | What it records |
|---|---|
| Channel | Marketing channel used to reach the site |
| Channel Drilldown 1 | First level of channel detail, such as search engine |
| Channel Drilldown 2 | Second level of channel detail, such as campaign |
| Channel Drilldown 3 | Third level of channel detail, such as advertiser or keyword group |
| Landing Page | Exact first page the visitor landed on |
| Landing Page Group | Category or section of that landing page |
Labels must match exactly for the tool to populate them.
| Field | Example value |
|---|---|
| Channel | Paid Search |
| Channel Drilldown 1 | |
| Channel Drilldown 2 | Brand Campaign |
| Channel Drilldown 3 | Dropbox |
| Landing Page | www.dropbox.com/features/share |
| Landing Page Group | Features |
Illustrative example; values depend on campaign configuration.