Skip to content

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.

  1. A snippet runs on every page and reads the visitor's referrer, UTM parameters and device information.
  2. It sorts the visit into a channel group and stores that classification in a cookie in the visitor's browser.
  3. When the visitor opens a form, the script writes the stored values into the form's hidden fields.
  4. 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.

A reporting menu: which question needs which field

Not every report needs every field. This pairing keeps report design honest, because each question names the data it depends on.

  • How many leads did a given ad campaign produce? Needs Channel plus Channel Drilldown 2.
  • What is the lead-to-opportunity conversion rate for that campaign? Needs the same fields, joined to opportunity records in the CRM.
  • How much pipeline came from it? Needs channel fields joined to deal values.
  • How many closed-won deals originated there? Needs channel fields joined to closed deal status.
  • How much revenue has been secured from those customers? Needs channel fields joined to closed-won amounts.
  • What is the return relative to spend? Needs the revenue figure above combined with the campaign's cost, which lives in the ad platform, not the CRM.
  • How many leads did the blog generate, and which posts did best? Needs Landing Page Group for the section total and Landing Page for the per-post split.
  • Which posts turn visitors into customers? Needs Landing Page joined to closed-won status.

The last two pairs are the reason the landing page group exists. Grouping lets you judge a whole section as one unit, while the individual page field lets you find the outliers inside it.

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 map: what each field holds and what it answers
Hidden fieldWhat it holdsExample valueReport question it supports
ChannelChannel group the visit was sorted intoPaid SearchWhich channel produces the most leads?
Channel Drilldown 1Platform or source within the channelGoogleWhich platform within a channel performs best?
Channel Drilldown 2Campaign nameBrand CampaignWhich campaign produces leads and revenue?
Channel Drilldown 3Most specific identifier availableThe advertiser's brand termWhich specific targeting drives conversions?
Landing PageFirst page the visitor sawA cloud-storage features pageWhich individual pages convert?
Landing Page GroupSection the landing page belongs tofeaturesHow 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.

Pre-build checklist before you touch the site
CheckWhy it mattersPass condition
All six field names match exactlyThe script looks for specific namesNames match character for character, including spacing
Fields are hidden from visitorsHidden fields should not add frictionNo visible input on the rendered form
Hidden values survive submissionA dropped field looks like a working oneTest submission includes all six values in the payload
Script is present on form pagesCapture depends on the snippet runningSnippet loads on every page hosting a lead form
A test UTM URL is readyYou need a known input to verify outputOne URL with a recognisable campaign parameter
Reporting tool chosenData is only useful if queriedAgile 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.