How to capture Google Analytics data in Duda forms
Google Analytics tells you which channels bring visitors to your site, but for most service businesses it stops short of telling you which of those visitors became enquiries. The gap closes when the form itself carries the visitor's source. This guide walks through adding hidden fields to a Duda form, letting an attribution script fill them, and choosing where the resulting lead-source data should be reviewed.
Why form-level source data matters
A standard analytics setup groups traffic into channels such as Paid Search, Organic Search and Paid Social. That is useful for understanding reach, but unless you run an online store it rarely connects a channel to a named lead or a closed customer.
Capturing source details inside the form changes the unit of reporting from a visit to a person. Each submission then arrives with the context of how that person first found you, which is the raw material for lead and customer reporting later on.
The four-step setup at a glance
The workflow has four stages: create the hidden fields in your Duda form, let an attribution tool populate them, submit the form so Duda stores the values, then report on the stored data. Each stage is described below, with the exact field names you need.
Step 1: add the hidden fields
Open your Duda form and add six hidden fields. Use these names exactly, because the attribution script matches on them:
- Channel
- Channel Drilldown 1
- Channel Drilldown 2
- Channel Drilldown 3
- Landing Page
- Landing Page Group
Duda's form editor supports hidden fields directly; the linked walkthrough covers the clicks if you have not added one before. Add all six to every form you want to track, not just the main contact form.
Step 2: how the hidden fields get filled
When a visitor arrives, the attribution script inspects the same kinds of technical signals Google Analytics uses, classifies the visit into a channel, and stores the result in a cookie in that visitor's browser. When the visitor later submits a form, the script writes the stored values into the hidden fields you created.
The values are not typed by the visitor and are not visible on the page, so the form looks unchanged to them.
A worked example: what the fields contain
Suppose a law firm runs an Estate Planning campaign on Google and a visitor arrives from it. The fields would be populated roughly as follows:
- Channel: Paid Search
- Channel Drilldown 1: Google
- Channel Drilldown 2: Estate Planning Campaign
- Channel Drilldown 3: Los Angeles Estate Planners, or whichever keyword the visitor searched
- Landing Page: the first page they saw, for example www.lalaw.com/services/estate-planning
- Landing Page Group: the grouped label for that page, for example Services
Read the drilldowns as a widening-to-narrowing path: channel type, then platform, then campaign, then keyword or ad detail. The landing page pair answers a different question, namely which page first earned the visit.
Step 3: Duda stores the values with the submission
On submit, Duda records the hidden-field values alongside whatever the lead typed, such as name, email and phone. From that point the source data is part of the lead record rather than a separate analytics event, which is what allows it to travel with the lead into other systems.
Step 4: choose where the data should surface
There are four practical destinations, and they are not mutually exclusive:
- Inside Duda: the Form Responses area lists each submission with its captured source values, which suits quick spot checks.
- Email notifications: include the source fields in the alert Duda sends on each submission, so whoever replies sees the context immediately.
- CRM: pass the values into a system such as Salesforce, Pipedrive or HubSpot so source becomes a property of the lead and later the customer.
- Spreadsheet: export the full submission, source included, to Google Sheets or Microsoft Excel for lighter-weight analysis.
A reasonable default is CRM for anything you will follow up on, plus email notifications for speed of response. Use the spreadsheet route when you want to explore the data before committing to CRM field design. Whichever route you pick, the captured values travel with the lead record rather than sitting in a separate analytics view.
Three report patterns worth setting up
Once source data lives next to lead and customer records, three report shapes cover most questions:
- Leads by channel, month by month. This gives a high-level read on what is working. A common finding is a channel that delivers plenty of visits but few leads, which is a signal to reconsider the budget allocated to it.
- Customers by Google Ads campaign. This narrows the view to paid search and shows which campaigns produce actual customers rather than clicks, so investment can follow the campaigns that convert.
- Revenue by Facebook ad network. This breaks results down by where the ads ran, such as Facebook, Instagram, Messenger or WhatsApp, and helps direct spend toward the placements that pay back.
Pick the report that matches the decision in front of you rather than building all three at once.
What the attribution tool does, in plain terms
The tool is a small piece of code placed on the Duda site. It classifies each visit into the same channel categories you see in Google Analytics, holds that classification in the browser, and writes it into the hidden fields at submission time. Nothing about the visitor's experience of the form changes.
Its purpose is narrow: attach source context to form submissions so that lead and customer reporting can include it.
Setup checklist before you go live
- All six hidden field names match exactly, including capitalisation and spacing.
- Every form that matters has the fields, not only the primary contact form.
- A test submission shows values in Duda's Form Responses area.
- Email notifications include the source fields if your team replies from those alerts.
- CRM fields exist to receive the values, and the mapping is confirmed on a real record.
- One report is built and shared with whoever owns budget decisions.
Where to go next
Start with the hidden-field walkthrough, then decide on the destination that fits how your team works. If a CRM is in the picture, the integration notes for Salesforce, Pipedrive and HubSpot explain how source values are carried across.
| Field name | What it records | Example value |
|---|---|---|
| Channel | Broad channel category of the visit | Paid Search |
| Channel Drilldown 1 | Platform or source within the channel | |
| Channel Drilldown 2 | Campaign name | Estate Planning Campaign |
| Channel Drilldown 3 | Keyword or ad-level detail | Los Angeles Estate Planners |
| Landing Page | First page the visitor saw | www.lalaw.com/services/estate-planning |
| Landing Page Group | Grouped label for that page | Services |
Field names must be entered exactly as shown. Example values come from an illustrative law-firm scenario, not a live account.
| Destination | Best for | Trade-off |
|---|---|---|
| Duda Form Responses | Quick checks on individual submissions | Manual review, no aggregate reporting |
| Email notifications | Fast context for whoever replies | Scattered across inboxes, not reportable |
| CRM | Ongoing lead and customer reporting | Requires field setup and mapping |
| Spreadsheet | Exploratory analysis before committing | Needs manual upkeep to stay current |
Destinations reflect the options described in the guide; suitability depends on your team's workflow.
Frequently asked questions
Do visitors see or fill in the hidden fields?
No. The fields are hidden on the form and are populated by the attribution script from data stored in the visitor's browser, so the visible form is unchanged.
What is the difference between Channel and the Channel Drilldowns?
Channel gives the broad category, such as Paid Search. The three drilldowns narrow it step by step: platform, then campaign, then keyword or ad-level detail.
Can I use the captured data without a CRM?
Yes. The values appear in Duda's Form Responses area and can be included in email notifications or exported to a spreadsheet. A CRM becomes worthwhile when you want ongoing lead and customer reporting rather than one-off review.
Why does Google Analytics alone not answer this question?
Analytics reports visits and channels well, but for non-ecommerce sites it does not connect a channel to a specific lead or customer. Capturing source inside the form attaches that context to the person.