How to integrate Google Analytics with Agile CRM
Agile CRM records who a lead is. It does not, on its own, record how that person found you. This guide closes that gap: you add a small set of hidden fields to your lead forms, let an attribution script fill them from the visitor's referrer, UTM parameters and device data, and then report inside Agile CRM on which channels and which pages actually produce leads, opportunities and closed-won revenue. The four setup steps below are short. The reporting and troubleshooting sections are where most of the value sits, because a filled field that nobody queries is just clutter in the contact record.
Why channel and landing page belong in the CRM
Analytics tools count sessions; a CRM counts people and money. The two views answer different questions, and the gap between them is where budget decisions go wrong. If you cannot see which channel produced a contact, you cannot tell whether a campaign generated signups or merely traffic, and you have no defensible basis for moving spend.
Two pieces of information close most of that gap:
- Channel — how the visitor reached the site, typically organic search, paid search, paid social or referral, with the campaign, ad group and keyword detail behind it.
- Landing page — the first page the visitor saw, plus the section of the site it belongs to, such as a blog post within the blog.
With both attached to the contact record, a report can answer questions a session-based tool cannot: how many leads a specific ad set produced, what share of them became opportunities, and how much closed revenue traces back to that source.
How the capture mechanism works
The approach here is a script on your site plus hidden fields on your forms. Nothing is installed inside Agile CRM itself.
- A snippet runs on every page and reads the visitor's referrer, UTM parameters and device information.
- It sorts the visit into a channel group and stores that classification in a cookie in the visitor's browser.
- When the visitor opens a form, the script writes the stored values into the form's hidden fields.
- On submit, those values travel to Agile CRM alongside the name, email and phone number the visitor typed.
Because the classification lives in a cookie, it survives the visitor moving between pages before they convert. It also means the data is only as good as the cookie: a visitor who clears cookies or returns in a fresh browser session may be classified differently on the second visit. Treat the captured channel as the source of the original visit, not as a permanent property of the person.
Step 1: Create the hidden fields on your lead forms
Add six hidden fields to every lead capture form you want to measure. The names matter, because the script looks for them:
- Channel
- Channel Drilldown 1
- Channel Drilldown 2
- Channel Drilldown 3
- Landing Page
- Landing Page Group
Most form builders let you add a hidden field from the field menu. If you maintain a custom HTML form, the equivalent is an input element marked as hidden for each of the six names.
Before you move on, check three things: the field names match exactly (including spacing), the fields are genuinely hidden from the visitor, and the form's submission actually includes hidden values in the payload your CRM receives. A hidden field that is dropped at submission looks identical to a working one on the page.
Step 2: Let the script fill the fields
Once the snippet is live, the hidden fields are populated automatically at the moment of submission. You do not ask the visitor anything, and there is no extra step in their journey.
A worked example makes the mapping concrete. Suppose a visitor arrives from a brand campaign running on paid search. The six fields would resolve as follows:
- Channel = Paid Search
- Channel Drilldown 1 = Google
- Channel Drilldown 2 = Brand Campaign
- Channel Drilldown 3 = the advertiser's own brand term
- Landing Page = the first page they landed on, for example a cloud-storage features page
- Landing Page Group = the section that page belongs to, for example features
Read the drilldowns as a hierarchy rather than three unrelated labels: the first narrows the channel to a platform, the second to a campaign, the third to the most specific identifier available. That structure is what makes a report groupable at whichever level you need.
Step 3: Confirm the values land on the Agile CRM record
On submission, the channel and landing page values are transferred to Agile CRM together with the lead's name, phone number, email and any other fields on the form.
This is the step worth testing deliberately rather than assuming. Submit one test lead from a URL carrying a UTM parameter, open the resulting contact in Agile CRM, and confirm all six values are present and readable. If the contact exists but the six fields are blank, the break is upstream — usually a name mismatch or a form that strips hidden inputs — not a reporting problem.
Step 4: Build the reports
With the data on the record, reporting happens in whatever tool you already use: Agile CRM's own report builder, a dashboard, or a BI tool connected to the CRM.
Useful outputs at this stage include lead counts by channel, closed-won deal counts by channel, conversion rate from lead to opportunity, and other performance indicators you already track. Add the reports to a dashboard so the numbers are seen routinely rather than pulled once.
Using content data to decide where effort goes
Section-level reporting is most useful when it contradicts an assumption. A blog might attract a healthy volume of leads while converting very few of them into opportunities and customers. Seeing that clearly is what allows you to redirect time and resources toward something that does convert, instead of continuing to invest because traffic looks good.
The same logic applies per post: a small number of pages often carry most of the commercial value, and the per-page field is how you find them.
Tailoring sales follow-up from the captured source
Channel and landing page also tell a salesperson something about intent before the first call. If a contact arrived from a search about a specific problem, that search phrase indicates what the person is trying to accomplish, and the follow-up can be shaped around it rather than sent as a generic sequence.
The practical version: reference the problem the visitor was researching, and support the claim with material aimed at that same use case. The aim is a message that matches the reason the person arrived, which is more likely to move the deal than a message chosen at random.
Troubleshooting: two different failures
Most disappointment with this setup comes from conflating two distinct problems. Separate them before changing anything.
Failure A — the fields are empty on the contact record. The capture chain broke before the CRM. Check, in order: field names match the six required names exactly; the fields are hidden but still submitted; the script is present on the page where the form lives; the visitor's cookie was available at submission. An empty field is a plumbing issue.
Failure B — the fields are populated but the reports look wrong. Capture worked; interpretation did not. Common causes: grouping by the wrong drilldown level, comparing a channel total against a campaign total, counting leads from a period when the script was not yet live, or expecting historical contacts to be retroactively labelled. Data captured from go-live forward only applies from go-live forward.
A quick sanity check for either case: submit one test lead from a URL with a known UTM parameter and follow it end to end, from the form payload to the contact record to the report row.
What you end up with
After the four steps, Agile CRM holds the channel and first landing page for each new lead, and your reports can show how content, campaigns and organic search are performing in terms of leads, opportunities and revenue rather than sessions alone. That is the difference between guessing which marketing works and being able to show it.
| Hidden field | What it holds | Example value | Report question it supports |
|---|---|---|---|
| Channel | Channel group the visit was sorted into | Paid Search | Which channel produces the most leads? |
| Channel Drilldown 1 | Platform or source within the channel | Which platform within a channel performs best? | |
| Channel Drilldown 2 | Campaign name | Brand Campaign | Which campaign produces leads and revenue? |
| Channel Drilldown 3 | Most specific identifier available | The advertiser's brand term | Which specific targeting drives conversions? |
| Landing Page | First page the visitor saw | A cloud-storage features page | Which individual pages convert? |
| Landing Page Group | Section the landing page belongs to | features | How does an entire site section perform? |
Example values illustrate the supplied paid-search scenario; the drilldown contents depend on the UTM parameters and referrer present on the visit.
| Check | Why it matters | Pass condition |
|---|---|---|
| All six field names match exactly | The script looks for specific names | Names match character for character, including spacing |
| Fields are hidden from visitors | Hidden fields should not add friction | No visible input on the rendered form |
| Hidden values survive submission | A dropped field looks like a working one | Test submission includes all six values in the payload |
| Script is present on form pages | Capture depends on the snippet running | Snippet loads on every page hosting a lead form |
| A test UTM URL is ready | You need a known input to verify output | One URL with a recognisable campaign parameter |
| Reporting tool chosen | Data is only useful if queried | Agile CRM report builder, dashboard or BI tool selected |
A preparation checklist, not a substitute for testing your own form and CRM configuration.
Frequently asked questions
Does this require a native Agile CRM integration?
No. The mechanism is a script on your website plus hidden fields on your forms. Captured values are submitted with the form and arrive in Agile CRM as part of the lead record, so there is no separate connector to install inside the CRM.
Which page counts as the landing page if a visitor browses before converting?
The first page the visitor sees is the one captured, not the page holding the form. That is deliberate: it reflects the content that brought the person in, which is usually the more useful signal when judging marketing.
Will existing contacts be labelled retroactively?
No. Values are written at form submission, so contacts created before the script was live will not carry channel or landing page data. Reports covering earlier periods will understate totals unless you scope them to the go-live date onward.
Why is a field blank on a contact that clearly came from a campaign?
Blank fields mean the capture chain broke before the CRM. The usual causes are a field name that does not match exactly, a form that strips hidden inputs on submission, or the script not running on the page where the form lives.
Can I report on a whole blog section and on individual posts?
Yes. Landing Page Group gives you the section total, and Landing Page gives you the per-post split. Using both lets you judge the section as a unit while still finding the posts that carry most of the value.