Skip to content

How to Capture Google Analytics Data in Formstack Forms

Formstack collects the name, email, and phone number a visitor types in. It does not, on its own, record whether that visitor arrived from a paid search ad, an organic result, or a social post. This guide shows how to add hidden fields to a Formstack form, fill them with channel and landing-page context, and forward the completed submission into a CRM or marketing tool so reports can connect leads to the campaigns that produced them.

Why form submissions need attribution context

A form submission tells you who raised their hand. It does not tell you which marketing effort prompted them. Without that second layer, campaign reviews rely on guesswork: you can see traffic in analytics, but you cannot see which traffic turned into pipeline.

Capturing channel and landing-page data at the moment of submission closes that gap. Each lead record then carries the context needed to compare channels on lead quality and revenue, not just on visits.

How the attribution layer works

The attribution tool reads signals available on each visit, such as UTM parameters and the referring site, and sorts the visitor into a marketing channel. That classification is stored in the visitor's browser. When the visitor submits a Formstack form, the tool writes the stored values into hidden fields you have added to the form. The submission then contains the normal contact details plus the channel and landing-page context, and can be routed onward through Formstack's native integrations or Zapier.

Step 1: Add the hidden fields to your Formstack form

Create six fields in the form and mark each one hidden. In Formstack this is done by ticking the Hidden checkbox in the field properties.

The six fields are:

  • Channel
  • Channel Drilldown 1
  • Channel Drilldown 2
  • Channel Drilldown 3
  • Landing Page
  • Landing Page Group

Use these names so the attribution tool can populate the fields.

What each hidden field holds

The table below maps each field to the value it receives, using the worked example of a visitor who clicked a paid search ad for a file-storage brand and landed on a features page. The example values are illustrative of the field structure, not a claim about any company's live campaigns.

Step 2: Let the attribution tool populate the fields

Once the hidden fields exist, the attribution tool fills them automatically as visitors browse. No manual entry is required.

In the worked example, a visitor arrives from a paid search ad. The fields would resolve to Channel = Paid Search, Channel Drilldown 1 = Google, Channel Drilldown 2 = Brand Campaign, and Channel Drilldown 3 = the advertiser name. The landing page field records the page the visitor first landed on, and the landing page group records the category that page belongs to, such as a features page.

Step 3: Confirm Formstack captures the values

When a visitor submits the form, Formstack stores the hidden field values alongside the contact details they typed. Submit a test entry from a tagged link and open the submission record. If the hidden fields are empty, verify that the hidden fields are present and that the attribution tool is installed on the form page.

Step 4: Send the submission to your CRM or marketing tool

Formstack's native integrations or Zapier can forward the full submission, including the hidden field values, into a CRM such as Salesforce, HubSpot, Pipedrive, or Zoho CRM, or into an email marketing or billing system. Make sure the destination has fields that can receive the hidden values.

Once the data lands in the CRM, reports can group leads, opportunities, and revenue by channel and by landing page.

The two dimensions worth capturing

Attribution here rests on two pieces of information: how the visitor arrived, and what content they were looking at.

Channel data answers the first question. Each visit is assigned to a channel such as paid search, organic search, or paid social. Where the channel supports it, finer detail is recorded too, such as the ad group or keyword for a paid search visit.

Landing-page data answers the second. The specific page and the category it belongs to are both stored, which lets you compare content types, such as blog posts against feature pages, on the leads they generate.

Pre-launch checklist

  • All six hidden fields exist and are marked hidden.
  • Field names match the list exactly, including capitalization and spacing.
  • The attribution tool is installed on the pages where the form is embedded.
  • A test submission from a UTM-tagged link shows populated values in Formstack.
  • The submission is forwarded to the CRM or marketing tool via a native integration or Zapier.
  • A test submission from a UTM-tagged link shows populated values in Formstack.
Hidden field reference with worked example
Hidden fieldWhat it holdsExample value
ChannelMarketing channel assigned to the visitPaid Search
Channel Drilldown 1First level of channel detailGoogle
Channel Drilldown 2Second level of channel detailBrand Campaign
Channel Drilldown 3Third level of channel detailDropbox
Landing PageFirst page the visitor landed onwww.dropbox.com/features/productivity
Landing Page GroupCategory the landing page belongs toFeatures

Example values are illustrative of the field structure, not a claim about any company's live campaigns.

Frequently asked questions

Why must the fields be hidden?

Hidden fields are filled by the attribution tool rather than by the visitor, so they can carry attribution context without adding questions to the form. Marking them hidden in Formstack keeps them out of the visible form while still storing their values on submission.

What if the hidden fields arrive empty in my CRM?

Verify that the six hidden fields exist in Formstack and that the attribution tool is installed on the pages where the form is embedded.

Which CRMs can receive the data?

Formstack's native integrations and Zapier can forward submissions to Salesforce, HubSpot, Pipedrive, Zoho CRM, and other marketing, email, or billing tools. The destination must be able to store the hidden values you want to keep.