Home 2 Ways to Track Lead Generation with Google Analytics
Post
Cancel

2 Ways to Track Lead Generation with Google Analytics

​​I’m going to show you the best way to track lead generation in Google Analytics along with a common alternative you should stay away from and why.

Why you absolutely need Google Analytics for tracking lead generation

Before you do anything toward generating leads, you must have a way to measure your leads. This is non-negotiable.

If you haven’t done so, here’s how to install Google Analytics with Google Tag Manager.

I’ll spare you the 7 reasons you should use Google Analytics to track leads and boil it down to one sentence:

If you can’t measure, you can’t improve.

Google Analytics is constantly evolving. For context, I’ll share with you where Google Analytics tracking is today and where it’s going so I can prepare you for the upcoming changes.

Universal Analytics (UA) vs Google Analytics 4 (GA4)

Before I show you how to track leads with Google Analytics, I need to distinguish between versions of Google Analytics and which one I’ll be covering to track leads.

Google Analytics has grown over the years. At the moment, there are two main versions of Google Analytics: Universal Analytics (UA) and Google Analytics (GA4).

GA4 is the newest version of Google Analytics. I won’t go into detail about all the differences between UA and GA4, here. However, I will touch on why you should use UA vs GA4 for lead tracking today and share a tip to make the inevitable transition to GA4 when the time is right.

It’s too early for Google Analytics 4

Only Supporting Universal Analytics

The main reason I’m a proponent for UA vs GA4 to track leads is because GA4 isn’t ready for prime time.

What do I mean?

The reality is most software services haven’t integrated with GA4 to pass data around. UA remains the standard way to integrate with Google Analytics. This will change over time and eventually GA4 will phase out UA and become the standard integration.

Until then, stick with UA to measure your lead generation.

Recommendation for setting up Google Analytics today

In the meantime, I recommend setting up both UA and GA4 so I can position you for the inevitable transition from UA to GA4.

2 ways to track leads with goals in Universal Analytics

UA gives you 4 types of ways to track goals. Of the 4 goal types, 2 of them are relevant for tracking leads and there’s 1 way I recommend. I’ll show you how to do both and outline the pros and cons for each. 

Goal Type: Destination

This is the method I suggest steering away from. The destination goal type works when a user visits a certain page on your website.

Here’s a common scenario.

You have a form with an offer and a call-to-action. When a user takes you up on your offer and submits the form, they get redirected to a “thank you” page or a confirmation page.

When the user gets redirected and pings your goal page, that chalks up a goal completion (aka conversion) to UA.

Goal completions and conversions are synonymous.

Here is the pro and con to this method of tracking leads:

  • 👍Pro: Easy to implement.
  • 👎Con: Leaves opportunity to collect inaccurate data. For example, a user can accidentally navigate to your goal page and trigger a goal completion.

Goal Type: Event

I recommend using the event goal type in UA to track leads for the following reasons and also to mention the downside:

  • 👍Pro: You save the user the step of being redirected to another page.
  • 👍Pro: But more importantly, you get more accurate data because the only way to fire a conversion is when the user successfully submits a form.
  • 👎Con: The downside is it might be difficult to implement and requires an extra step of configuring an event, then setting it up as a goal.

How to set up an Google Analytics events when you capture a lead

There are two ways to set up Google Analytics events: Manually or through a pre-built integration.

Pre-built integration to fire a Google Analytics event

This is the best-case scenario so you don’t have to deal with configuring events. This will depend on what website platform and forms you’re using to collect leads. It’s worth looking to see if your form provider has a way to push events to Google Analytics “out of the box.” If so, go to the next step on how to set up goals from events.

Setting up Google Analytics events manually

You checked, but there’s no pre-built integration from your form to Google Analytics to record captured leads as events. Not to worry, I’ll provide you with some code examples of how you can do this yourself.

First, you’ll need to install the tracking code. I suggest doing this with Google Tag Manager to make your life easier.

Now that you have your tracking code installed, you’ll need to tell your form to “listen” for form submissions and then relay the information to Google Analytics as an event.

Here’s a code snippet about how to do it on your website:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// insert script before closing body tag   
<script>  
// get form with id selector  
const form_name = document.getElementById('form-id');  
  
// on form submit, send event to google analytics  
form_name.addEventListener("submit", () => {  
  ga('create', 'UA-XXXXXXX-X', 'auto');  
  ga('send', {  
  hitType: 'event',  
  eventCategory: 'Form',  
  eventAction: 'Submission',  
  eventLabel: 'Offer Name'  
  });  
}  
</script>  
</body>  

I made a video a while back, How to Setup ActiveCampaign Form Submissions as Events in Google Analytics. The video is long because I step through the ActiveCampaign documentation to configure it.

And last but not least, here’s a gist code example of how I send events to Google Analytics for a feedback form.

Please note, I left out the eventValue because it’s optional and there’s little use for lead generation purpose unless you know precisely how much a lead you collect is worth and the value stays constant.

How to create a Google Analytics goal from an event

You’ve done the hard part of configuring an event and now here’s the super simple part of turning your event as a goal.

Track Lead Generation with Google Analytics Goals

The 2 most common paths to track for lead generation

The two most common paths a lead is gained is via form submissions and phone calls. Form submissions range in application (ex: live chat, chatbots, newsletter opt-ins, etc.), they’re just form submission events in the DOM.

In order to track phone calls, you’ll need special call tracking software that can map an incoming phone call and tie it to the website visitor on your website. There are many call tracking software companies in the market, like CallRail, Call Tracking Metrics, Ringba, and the list goes on.

What call tracking software handles for you is the automatic creation of events in Google Analytics you can then turn into goals. If you’re running Google Ads, this kind of software can automatically send conversion data to your campaigns, too.

Summary

You need to track your leads or you won’t have a leg to stand on. Please avoid the age-old adage:

Half the money I spend on advertising is wasted; the trouble is I don’t know which half.

Once you track your leads in Google Analytics, you’ll be able to get a baseline of where you’re currently at with your lead generation efforts. From there, you’ll be able to create reports and see how effectively you’re moving toward your business goals.

This post is licensed under CC BY 4.0 by the author.