How do I know which of my leads came from Google Ads?

Here's the problem... Conversion tracking or analytics can tell you how many leads you got, but not who they are. And unless you know who came from your ads, you can't tell if you're making money from those ads.

If you knew exactly which leads came from Google Ads ...

Google does this seamlessly for online sales, but not for leads. You have to set this up yourself unless you're using a CRM with search-to-sale analytics built in.

I've set up search-to-sale analytics for a few clients. We know the exact keyword and ad the lead first clicked, even if the sale happens months later.

Optimise for sales, not leads

This level of detail might seem obsessive, but it lets us optimise in a way that would be impossible with only the built in data from Google.

Finding out if a lead came from Google Ads is a two step process.

  1. Getting information from Google to your website.

  2. Getting that information from your website to your inbox or CRM.

Getting information from Google to your website.

Google uses URL parameters to pass information to your website. If that made as much sense as if I’d said Google uses talking frogs to pass information to your website then you’re in the right place.

[Aside: This is the non-techy explanation. If you know what an URL parameter is you might want to skip the rest of this article.]

An URL is geek speak for a link to a webpage.

It might look something like...

https://www.example.com

It could be more complicated...

https://www.example.com/news/index.php

Or it could be a monster...

https://www.example.com/index.php?keyword=immigration%20attorney&campaign=2057681465&location=1026339&gclid=EAIaIQobChMI2LaRqpL15gIVCr3ACh274AwaEAAYASAAEgIn8PD_BwE

The URL parameters are the interesting bits. They come after the question mark in the URL.

https://www.example.com/index.php?keyword=immigration%20attorney&campaign=2057681465&location=1026339&gclid=EAIaIQobChMI2LaRqpL15gIVCr3ACh274AwaEAAYASAAEgIn8PD_BwE

It’s easier to read if we split them at the & character...

keyword=immigration%20attorney&campaign=2057681465&location=1026339&gclid=EAIaIQobChMI2LaRqpL15gIVCr3ACh274AwaEAAYASAAEgIn8PD_BwE

...and stack them on top of each other.

keyword=immigration%20attorney
campaign=2057681465
location=1026339
gclid=EAIaIQobChMI2LaRqpL15gIVCr3ACh274AwaEAAYASAAEgIn8PD_BwE

Each parameter has 2 parts, separated by an = sign.

keyword=immigration%20attorney
campaign=2057681465
location=1026339
gclid=EAIaIQobChMI2LaRqpL15gIVCr3ACh274AwaEAAYASAAEgIn8PD_BwE

The part on the left is the key which describes the information.

keyword=immigration%20attorney
campaign=2057681465
location=1026339
gclid=EAIaIQobChMI2LaRqpL15gIVCr3ACh274AwaEAAYASAAEgIn8PD_BwE

The part on the right is the actual information, called value in geek speak.

keyword=immigration%20attorney
campaign=2057681465
location=1026339
gclid=EAIaIQobChMI2LaRqpL15gIVCr3ACh274AwaEAAYASAAEgIn8PD_BwE

So for the first parameter keyword=immigration%20attorney the key is keyword, and the value - the information - is immigration%20attorney.

immigration%20attorney is still a bit gobbledegook. You can’t put spaces in URLs so a space is represented by the code %20. Turning that back into human we have immigration attorney, which was the keyword that triggered the ad.

You can get a full list of URL encodings here.

The numbers for the campaign and loation parameters are Google's internal id numbers. I use them to get the actual campaign name and location when I pass the information to my client.

The last parameter is the gclid - Google Click Id. Google ads this to all clicks from Google Ads. It’s used to track conversions.

Telling Google what information you want

The glcid is the only parameter that's sent automatically. You have to tell Google to send the other parameters. You do this with a tracking template.

You can set up a tracking template at account level, campaign level or ad group level. I’m using an account level tracking template in this case. All clicks from this account have the same parameters. (But obviously not the same values for those parameters.)

This is what the tracking template looks like for the url I used as an example earlier

{lpurl}?keyword={keyword}&campaign={campaignid}&location={loc_physical_ms}

It looks a bit garbled but once you pull it apart it makes a bit more sense. We’ll split it at the question mark again as we did before

{lpurl}?keyword={keyword}&campaign={campaignid}&location={loc_physical_ms}

{lpurl} is the placeholder for landing page URL. https://example.com/index.php from my example.

The parameters are after the question mark

{lpurl}?keyword={keyword}&campaign={campaignid}&location={loc_physical_ms}

We split these using the & character like we did before

keyword={keyword}
campaign={campaignid}
location={loc_physical_ms}

Anything in curly brackets is a placeholder. The actual value will be set by Google when your ad is clicked.

You can use 2 kinds of parameters.

1. Google’s value track parameters.

You supply the name of the parameter eg keyword and choose one of the available placeholders eg {keyword}. Google swaps the placeholder for the real keyword when the ad gets clicked.

You’ll find a full list of value track parameters here.

2. Custom parameters.

You supply the name and the value. For example source=google-ads or campaign=brand.

UTM parameters

You don’t have to come up with a naming convention for your parameters. UTM parameters are almost standard in online marketing. Some analytic and CRM software is able to recognise and understand UTM parameters without any configuration.

The UTM parameters are

More detail about what each of these parameters is for here.

Getting information from URL parameters to your inbox

Warning: this is the non-technical version. If you decide to implement this, find a web developer because there are some security implications.

The process for getting information from URL parameters to you is:

1. Extract the keys and values from the URL parameters.

If you were going to brief a web developer you’d say something like "I’d like to parse the parameters out of the GET request". More detail is beyond the scope of this article.

2. Save them somewhere.

You can save the data as

Saving as a hidden form field isn't great because the data would probably be lost if the visitor left the landing page.

Cookies and session variables survive while the visitor wanders around your site. If your visitor arrives at your landing page, checks your privacy policy and then fills in the form on your contact page you've still got the data.

And, depending on several technical things, that data may survive after the visitor has left your website. That means that if they come back to your site some time later, you may still be able to get the original URL parameters.

3. Send them to you.

This starts when the visitor hits the button to submit the form. The information they’ve given you, and any hidden form fields, is sent to a computer program. We'll call that the form handler.

At it’s simplest the form handler would take the information it received and email it to you.

It can also be a lot more complicated. For instance, the form handler for my lead generation sites:

If the checks pass, the form handler sends the information it received and the URL parameters to my client by one or more of email, SMS and webhook. My clients use webhooks for inserting leads directly into their CRMs or a lead tracking spreadsheet.

How to track leads from phone calls

This is a little more tricky than tracking enquiry forms because it needs a third-party service. I use CallRail for this.

Two things happen when someone calls the number shown on the landing page.

Tracking leads from call extensions

Calls from call extensions don't give much detail. The visitor hasn't clicked to your site so there is no URL with URL parameters.

I use a unique phone number (again from CallRail) for call extensions. Any calls arriving via this number are from the call extension. Depending on how much granularity I need, I might set up account, campaign or ad group level call extensions, each with their own number.

When someone calls one of the call extension numbers the same two things happen. We create a record in the CRM, and call is routed to an operator. Again we can link the person to the account, campaign or ad group.

The end.

Want higher conversion rates?

I’ve seen conversion rates double, triple and even 10X after a few quick and easy changes to the enquiry form.

Subscribe now and I'll send you a free copy of my in-depth ebook High-Converting Enquiry Forms.

You're already paying for clicks. Now turn them into conversions.

Privacy policy. Unsubscribe at any time.

RELATED ARTICLES

Do I really need 7 websites?
Two groups of people visit your website: people who know what you sell and strangers who don't know you but want what you sell. One website can't serve both groups effectively.
Does PPC work for accountants?
The short answer is “Yes, but only sometimes”. Google suggests that AdWords will work for any business but this is not true in real life.
Google Ads for industries with long sales cycles
A client installs billboard size video screens. Here's how we used AdWords to get him in front of the decision makers early enough.
How do I know which of my leads came from Google Ads?
Here's the problem... Conversion tracking or analytics can tell you how many leads you got, but not who they are. Read on to see how to fix this.
How do you test a business idea?
You don’t want to invest time and money on a business idea unless you’re sure that it’ll get traction. Read on to learn how to use Google Ads to test an idea before committing to it.
How much is a Facebook like worth?
I've just run a quick calculation and can confidently say that a Facebook like is worth $0.007. Let me explain
How we turned no-shows into $185 150 worth of new business every month
No-shows cost my client $283 328 a month. Here’s how we turned them into $185 150 worth of new business every month - without spending more on Google Ads.
Which are the specifically right targets for a small paper pallet company?
This question was asked on Quora. Saving my answer here.
How to turn leads into sales.
Two businesses in the same industry. One converts 5% of website leads into sales. The other converts 60%. Read on to find out why.
I can’t get to the decision maker.
"I‘ve got a great product but I can’t get to the decision maker." That’s a problem we smaller business owners face a lot. Can I tell you about how a former client of mine got the decision makers to come to her?
Is AdWords scaleable?
There are a finite number of people who want what you sell, can afford what you sell and are in an area you can reach. Some portion of those people will use Google. That number is the upper limit of AdWords scaleability.
Is AdWords worth it?
"Is Google AdWords really worth it? I have found that through tracking my CPC, I am not having that much success." was asked on Quora. My answer saved below.
Selling to strangers is different
Ask 100 small business owners how they find customers and 99 of us will say "word-of-mouth". What we won't tell you is that our word-of-mouth marketing is not well tuned engine that spits out a steady stream of great prospects. They arrive by luck or magic.
The cost of zero.
Every small business owner needs to understand the cost of zero before they next invest in marketing. It does not matter what medium it is: Google AdWords, Facebook, LinkedIn, magazines, radio, or anything else. The reason these campaigns fail so often is never as obvious as you might think.
Things you should never advertise on Google.
Making money advertising identical branded goods on Google is really hard.
Will Google Ads work?
Thinking about advertising on Google? There are thousands of people who've used Google Ads and never made a sale. You don't have to be one of them. Read on to learn how.
Zombie Hunting Wednesday 3pm. You in?
We’ve all got zombie leads. These are people we’ve quoted who haven't said yes. They haven’t said no either. Instead they’re ignoring us - our emails go unanswered and they’re always too busy to talk.