Skip to content

Capture Google Analytics Data in WS Form Submissions

Google Analytics shows visitor volume and traffic sources, but it does not by itself connect those visits to the leads, customers, and revenue that follow. Adding attribution fields to a WS Form submission closes that gap: each lead carries the channel and landing page that brought the visitor to the site, so reporting in a CRM or spreadsheet can start from the enquiry rather than from anonymous traffic.

Why attribution belongs on the form itself

Visitor counts alone cannot show which campaigns produce enquiries. When attribution data travels with the name, email address, phone number, and other details a visitor enters, later reporting can answer practical questions: how many leads came from a particular social campaign, which search campaign produced the most customers, and whether organic search revenue has changed since recent SEO work.

Four-step setup

The setup has four stages. First, add hidden fields to the form. Second, let the attribution snippet fill those fields when a visitor arrives. Third, let WS Form store the completed fields with the submission. Fourth, pass the submission onward and build reports from the captured values.

For the hidden fields, add a standard text field to the form and select the Hidden option. Repeat that step for each value you want captured: Channel, Channel Drilldown 1, Channel Drilldown 2, Channel Drilldown 3, Landing Page, and Landing Page Group. Keep the field labels consistent, because the downstream CRM mapping will depend on them.

Once the fields exist, the attribution snippet reads the technical signals available on arrival — the same kind of signals Google Analytics uses — groups the visit into a marketing channel such as Organic Search, Paid Social, or Paid Search, and stores that classification in a browser cookie. When the visitor later submits the form, the stored channel and landing page values are written into the hidden fields. WS Form then saves them alongside the visitor's own answers, and its native integrations, or a connector, can forward the whole submission to a CRM or another tool.

Worked example: a paid search enquiry

Consider a local dental practice whose visitor arrives through a paid search ad. The captured values might read: Channel — Paid Search; Channel Drilldown 1 — Google; Channel Drilldown 2 — Brand Campaign; Channel Drilldown 3 — Sydney Dental. The landing page might be the practice's teeth-cleaning services page, with the landing page group recorded as Services. That single submission now tells the practice not only who enquired, but which campaign and which page earned the enquiry.

What gets captured

Two groups of data are captured. Marketing channel data shows which channel delivered the lead — Paid Search, Organic Search, Paid Social, and so on — plus drilldown detail such as campaign, ad group, and keyword for paid search. Landing page data records the first page the visitor saw and the category that page belongs to, for example a blog post and its Blog category.

That distinction matters in reporting. Channel data answers where demand came from; landing page data answers which content earned it. Together they let a team total the leads generated by an entire blog, then break that total down by individual post, or compare one search campaign against another without relying on visitor-only metrics.

Reports to build first

Four reports are a useful starting point once the fields are flowing into a CRM or spreadsheet:

  • Leads by Channel: monthly lead counts grouped by channel, giving a big-picture view of which sources perform best and where budget should shift.
  • Opportunities by Google Ads campaign: monthly opportunities grouped by campaign, showing which campaigns produce genuine sales opportunities rather than clicks alone.
  • Customers by Facebook Ads network: customers grouped by the network where the ad appeared, such as Facebook, Instagram, Messenger, or WhatsApp, so spend can follow the strongest network.
  • Revenue from Organic Search by search engine: SEO-attributed revenue broken down by search engine and compared with channels such as Paid Search and Organic Social, showing whether organic work is contributing to growth.

Before building these, check that every form has the same hidden fields, that test submissions populate them, and that the CRM mapping preserves the drilldown and landing page values rather than only the top-level channel.