How to track leads in Google Analytics via CRM

Last Updated: May 26, 2022

Websites where the majority of conversions happen offline, often rely on leads generation for driving sales.

The most common type of leads is form leads. These are the leads generated through a form, which is embedded on a website.

Form leads can be classified into:

#1 Qualified leads – leads that meet your customers’ qualification criteria.

#2 Won leads – qualified leads that converted into actual sales.

There are two methods to track web form leads as conversions in GA:

#1 Traditional method

#2 Via CRM (client relationship management)

Customer Relationship Management (or CRM) is a tool that is used to track and manage leads and store all of the information about the leads.

The traditional method for tracking Web Form Leads as conversions in Google Analytics

In the traditional method, a user fills out the lead generation form on your website and then submits it.

You then track the confirmation page URL (the URL of the page which is shown to a user on successful form submission) as the destination goal in Google Analytics:

destination goal

This is one of the most common and widely used methods in GA.

But with this method, you will not be able to track qualified and won leads, as well as the sales associated with each form lead.

Tracking Web Form Leads as conversions in Google Analytics via CRM

Here is how this system works:

#1 A user fills out the lead generation form on your website and submit it.

#2 As soon as the user hits the ‘submit’ button, all of the lead information goes straight into your CRM software (like salesforce).

#3 You or your staff, qualify and categorise the lead via the CRM. So if a qualified lead turns into sales then it is labelled as ‘won’ and a monetary value is assigned to it.

#4 Your CRM stores all the lead data along with the corresponding client ID/user ID values.

#5 You download (or submit a request to download) the web form lead data from your CRM once a week or so.

#6 You import the leads data (along with qualified leads, won leads & monetary value attached with each lead) from your CRM into Google Analytics.

This is the best way to track web form leads in Google Analytics.

Requirements for tracking qualified and won leads in Google Analytics

Before you can track qualified and won leads in Google Analytics, make sure:

#1 You use CRM software (like Salesforce). You need CRM software to qualify leads and add monetary value to them.

#2 Your CRM software provides web to lead functionality. You need theweb to lead’ functionality so that every form submission on your website automatically creates a corresponding lead record in your CRM. For example, ‘Salesforce’ provides ‘web to lead’ functionality.

Follow the steps below to track qualified and won leads in Google Analytics:

Step-1: Decide the data you will send along with lead data to your CRM.

Step-2: Capture the additional data you will send along with lead data.

Step-3: Create one or more custom fields in your CRM.

Step-4: Send additional data along with lead data to CRM on form submission.

Step-5: Qualify and categorize the lead data.

Step-6: Download data from your CRM once a week.

Step-7: Import CRM data into Google Analytics.

Step-1: Decide the data you will send along with lead data to your CRM

It is important, that you at least send client ID (or user ID) along with the lead data, to your CRM. Otherwise, later on, you will not be able to map web form lead to its correct user in Google Analytics.

In addition to client id/user id and lead data, you should also consider sending additional data to your CRM. This additional data could be campaign source, campaign medium, referral etc.

Step-2: Capture the additional data you will send along with lead data

You can capture additional data in GA by writing a script.

For example, in order to capture client ID, ask your developer to write a script that is fired as soon as a user visits your website.

This script should automatically capture the client ID from the Google Analytics cookie and store it in a custom dimension with a user-level scope.

If you rely more on user id then capture user ID instead of the client ID.

Similarly, you can ask your developer to write a script that can capture referral data.

Step-3: Create one or more custom fields in your CRM.

In order to capture additional data in your CRM, you would need to create one or more corresponding custom fields in your CRM.

For example, you can create one custom field for storing the client ID and another custom field to store campaign source and so on.

Refer to your CRM help documentation to learn about creating custom fields or contact their customer support.

Step-4: Send additional data along with lead data to CRM on form submission

Additional data (such as client ID, campaign source, campaign medium etc) is not the type of data that you directly ask your website users to submit via a web form.

So in order to send this additional data (along with the web form lead data), you will need to write a script. This script should be able to send the additional data via form hidden input fields. These hidden fields will not be visible to your users.

Depending upon the type of data you want to send to your CRM, add one or more hidden input fields to all of the lead generation forms embedded on your website.

For example, you can add one hidden field for sending client ID on form submission, like the one below:

<form action=”” name=”myForm”>
Name: <input type=”text” name=”name”>
<input type=”hidden” id=”clientID_field” name=”clientID_field” value=””>
<input type=”submit” value=”Submit Form” name=”btnSubmit”>
</form>

Similarly, you can add another hidden field for sending campaign source on form submission and so on.

Attribution Modelling in Google Analytics and Beyond
Attribution Modelling in Google Ads and Facebook

Get my best selling books on Attribution Modelling

  • Learn to implement attribution modelling in your organisation
  • Understand the customer purchase journey across devices
  • Determine the most effective marketing channels for investment

 Click book covers to find out more

Step-5: Qualify and categorize the lead data.

You or your staff, qualify and categorise the lead via the CRM. So if a qualified lead turns into sales then it is labelled as ‘won’ and a monetary value is assigned to it.

Step-6: Download data from your CRM once a week

Refer to your CRM help documentation to learn about downloading data or contact their customer support.

Step-7: Import CRM data into Google Analytics

There are two methods you can use to import/send CRM data to Google Analytics:

  1. The data import (user data) feature. 
  2. Measurement protocol.

Sending CRM data to Google Analytics via the data import feature

If you wish to use the data import feature then follow the steps below to send CRM data to Google Analytics:

Step-1: Create a custom dimension for storing client ID or user ID.

Step-2: Create a custom dimension for storing the form lead type (e.g. qualified lead, won lead).

Step-3: Create a new user data set in GA.

Step-4: Use the client ID custom dimension as key and the form lead type custom dimension for imported data.

Step-5: Set the ‘overwrite hit data’ setting to yes.

Step-6: Download the data set schema template.

Step-7: Prepare the downloaded CRM data for import, according to the data set schema template.

Step-8: Upload the CRM data into Google Analytics

Step-9: Create a custom report to report on the CRM data.

If you are brand new to data import, then read this article: How to correctly measure Conversion Date & Time in Google Analytics where I have explained data import features in great detail.

Sending CRM data to Google Analytics via the measurement protocol

If you want to send CRM data via measurement protocol, then follow the steps below:

Step-1: Convert your CRM data into payload data. That is format your CRM data according to measurement protocol.

Step-2: Send the payload data to the Google Analytics server via a GET or POST HTTP request.

Note: There is one big downside of using measurement protocol. And that is the measurement protocol does not allow you to upload aggregated data (like tables). So implementation is pretty tricky.

To learn more about using the measurement protocol, read this article: Google Analytics Measurement Protocol Explained in Great Detail

Other articles on specialized tracking in Google Analytics

  1. Google Analytics Ecommerce Tracking Tutorial
  2. Google Tag Manager Event Tracking Tutorial
  3. Google Analytics Event Tracking Tutorial
  4. Google Analytics Store Visits Tracking Tutorial
  5. Offline Conversion Tracking in Google Analytics – Tutorial
  6. Ecommerce Tracking Google Tag Manager (GTM) – Tutorial
  7. Tracking Virtual Pageviews in Google Tag Manager – Tutorial
  8. Google Tag Manager YouTube Video Tracking
  9. How to unlock not provided keywords in Google Analytics?
  10. Google Analytics Virtual Pageviews Tutorial
  11. Google Analytics and YouTube Integration Tutorial
  12. Google Analytics for Facebook Tutorial
  13. Cross Domain Tracking in Google Analytics – Complete Guide
  14. How to use two Google Analytics codes on one page
  15. The one thing that you don’t know about PayPal.com and the referral exclusion list
  16. Google Analytics Calculated Metrics – Tutorial
  17. Creating your own Google Analytics Tag Auditing System
  18. Google Tag Manager Search Tracking without Query Parameter
  19. Tracking Google Analytics Paypal Referral and other payment gateways
  20. How to Track Phone Calls in Google Analytics – Call Tracking Tutorial
  21. Postbacks in Google Analytics Explained
  22. Subscription & Recurring Revenue Analytics in Google Analytics
  23. Track the Impact of Google Analytics Cookie Consent on Website Traffic
  24. Tracking Offline Conversions in Google Ads
  25. Implementing Scroll Tracking via Google Tag Manager
  26. Scroll Depth Tracking in Google Tag Manager – Tutorial
  27. Site Search Tracking In Google Analytics Without Query Parameters
  28. Google Tag Manager Youtube Video Tracking via YouTube Video Trigger
  29. How to Correctly Measure Conversion Date & Time in Google Analytics
  30. Google Analytics Social Tracking – Twitter, Facebook, Google Plus and LinkedIn
  31. Cross Domain Tracking in Google Analytics – Complete Guide
  32. Google Analytics Linkedin & Twitter Tracking
  33. Creating Content Group in Google Analytics via tracking code using gtag.js
  34. Google Analytics Site Search Tracking via Query Parameters
  35. Google Analytics Site Search Tracking Tutorial
  36. Creating and Using Site Search Funnel in Google Analytics
  37. Learn to Setup Facebook Pixel Tracking via Google Tag Manager
  38. AMP Google Analytics Tracking – Learn to track AMP pages
  39. Setting up Sales Funnel across websites in Google Analytics
  40. Regex Google Analytics & Google Tag Manager – Tutorial

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade

Learn and Master Google Analytics 4 (GA4) - 126 pages ebook

X
error: Alert: Content is protected !!