Enhanced conversions for leads is an upgraded version of offline conversion import that uses user-provided data, such as email addresses, to supplement imported offline conversion data to improve accuracy and bidding performance. When you import your offline conversions, the provided hashed customer data is used to attribute back to the Google Ads campaign by matching to the same data collected on your website (for example, lead form) and to signed-in customers who engaged with your ad.
If you already use offline conversions, you can upgrade to enhanced conversions for leads to import user-provided data in addition to the identifiers you already import (GCLID). Learn more about how Google used enhanced conversions for leads data.
Enhanced conversions for leads can improve the accuracy of your conversion measurement. It supplements the existing conversion tags by allowing advertisers to send hashed first-party customer data from your website in a privacy-safe way. The hashed customer data is compared to hashed customer data of signed-in Google Accounts and attributed to ad events to help measure conversions driven by your campaign.
After you’ve set up enhanced conversions for leads with Google Tag Manager or set up enhanced conversions for leads with the Google tag, you can confirm that your enhanced conversions are effectively working in the enhanced conversions diagnostics report. The diagnostics report will help you identify and self-diagnose issues implementing enhanced conversions. You can also set up enhanced conversions in the Google Ads API that can improve the accuracy of your conversion measurement.
This article explains how to set up enhanced conversion for leads with Google Tag Manager to support enhanced conversion for leads. It will guide you to configure Google Tag Manager to capture hashed user provided data on your website (e.g., lead forms). If your installation doesn't use Google Tag Manager, review the Google tag instructions.
Before you begin
Before setting up enhanced conversions for leads, you’ll need to identify your website lead forms and pick a field (e.g., email address) from the form that uniquely identifies your leads and that will also be included in your eventual offline import.
We recommend using the lead's email address because it’s a highly unique identifier and isn’t prone to being reformatted in your CRM. If you're using a phone number, the tag will automatically remove symbols and dashes, but the number must contain a country code. We recommend collecting both email address and phone number to improve your match rates.
- Note the URLs where the lead forms on your website are located. You may need this information during setup.
- Make sure that there's first-party customer data available (email or phone number) on your website lead form.
- In Google Ads, make sure that auto-tagging is enabled.
- Ensure that you've reviewed and confirmed that you can comply with the customer data policies in Google Ads (view the steps on this below).
You can configure enhanced conversions for leads in 2 steps:
Step 1: Configure your Google tag to capture hashed user provided data on your website (eg, email address or phone number from lead form)
- If you currently use Google Tag Manager for conversion tracking, you can follow the instructions below to set up enhanced conversions for leads with Google Tag Manager with only slight changes to your configuration.
- If you currently have conversion tracking implemented using the Google tag directly on your page (not within a third-party tool or iFrame), you can set up enhanced conversions for leads with your Google tag by making slight changes to your configuration.
Step 2: Set up automated import of your offline conversions data with the same hashed customer data using:
Step 1: Configure your Google tag to capture hashed user provided data on your website (eg, email address or phone number from lead form)
The steps for setting up offline conversion imports using enhanced conversions for leads are:
- Accept Customer data terms
- Configure enhanced conversions for leads in Google Tag Manager
- Verify your setup and publish the container
1. Accept Customer data terms
- In your Google Ads account, click the Goals icon
.
- Click the Conversions drop down in the section menu.
- Click Settings.
- In the enhanced conversions for leads drop-down, check the box to turn on enhanced conversions for leads, and then select Google Tag Manager as your method. You will be prompted to agree to Customer Data terms if you haven’t already.
- Select View Terms next to “Customer data terms” and read the “Policies and Additional Terms for Customer Data”.
- Click the checkbox beside "I have read and accept the terms on behalf of my company".
- Click Agree. You’ll notice your status updated as “Accepted”.
2. Configure enhanced conversions for leads in Google Tag Manager
To measure your enhanced conversions for leads with Tag Manager, you need to do the following:
- Set up a conversion linker tag.
- Specify a data source for leads conversions.
If you already have a Conversion Linker tag, you can skip ahead to Specify a data source for leads conversions.
Create a Conversion Linker tag
Conversion linker tags are used to help tags measure click data so that conversions are measured effectively. Deploy a conversion linker tag on all pages where visitors may land after they click an ad or promotion.
When people click on your ads, the URL of the conversion page on your website typically includes information about the click. When a site visitor takes an action that you’ve tagged as a conversion (e.g. when a Google Ads conversion tag is fired), the click information is used to associate that conversion with the click that brought the visitors to your site.
The conversion linker tag automatically detects the ad click information in your conversion page URLs, and stores this information in first-party cookies on your domain for web pages, and passes the data in URLs for AMP pages. If you use a conversion linker tag with Google Marketing Platform products, the conversion linker tag may also store unique identifiers in those cookies.
Set up a Conversion Linker tag in Google Tag Manager
To set up a conversion linker tag:
- Open Google Tag Manager
- Open the container you want to configure.
- Click Tags
New.
- Click Tag Configuration and select Conversion Linker.
- Select a trigger. In most cases, you should use a trigger that fires on all page views, or on specific page views where site visitors will land after an ad is clicked.
- Save and publish your tag configuration.
Instances of conversion linker tags for web and AMP containers will have the additional option to link across domains and web containers will also include the ability to override cookie settings.
Specify a data source for leads conversions
There are 3 ways in which you can implement enhanced conversions in Google Tag Manager. You only need to choose one option to collect user-provided data.
Automatic collection |
Manual configuration |
Code configuration |
|
Collection method |
Automatically collects user-provided data based on the code of your website. You won’t be able to collect phone numbers with this method. If you need control over where to collect inputs, opt for a manual or code setup. |
Specify select CSS properties or JavaScript variables to collect user-provided data. If you need to take control over data formatting and hashing, opt for code configuration. |
Add a code snippet on your website that sends hashed customer data for matching. This method is the best choice for maximizing the accuracy of enhanced conversions by letting you send consistently formatted data whenever your conversion tag fires. |
Complexity |
Simple |
Medium |
Complex |
Skills |
No special skills needed |
HTML and CSS and the ability to inspect the source code of your website. |
The ability to edit website code. |
Set up enhanced conversions for leads using “automatic collection” in Google Tag Manager
- Open Google Tag Manager
- In your "Workspace", click Tags from the navigation menu.
- Click New to create a new tag and select Google Ads User-Provided Data Event.
- In "Tag Configuration":
- In the field "Conversion ID", supply your Google Ads customer ID.
- Under "User-provided data", select New Variable.
- Create a new "User-Provided Data" variable.
- Set the "Type" to "Automatic".
- Name the variable.
- Click Save.
- In “Triggering”, set up should be done when the conversion should be counted:
- To add a new trigger, select the + in the upper right corner.
- Select a trigger that happens after the form has been filled out. For example, form submissions.
- Select All Forms.
- Name the trigger.
- Click Save.
- Name and save your new “Google Ads User-Provided Data Event” tag. Your tag should look similar to this:
Set up enhanced conversions for leads using "manual configuration" in Google Tag Manager
- Open Google Tag Manager
- In your “Workspace”, click Tags from the navigation menu.
- Click New to create a new tag and select Google Ads User-Provided Data Event.
- In “Tag Configuration”:
- In the field “Conversion ID”, supply your Google Ads customer ID.
- Under “User-provided data”, select New Variable.
- Create a new User-Provided Data variable.
- Set the “Type” to “Manual”.
- For the relevant user data field that you would like to provide via enhanced conversions, add a new or existing variable.
- Note: If you already have variables in your data layer (whether using CSS selectors or other variable types), you can select those instead of creating new variables. If you aren’t sure, continue through the instructions. The variables may be hashed or unhashed.
- To specify an element from the DOM, create a New Variable > Variable Configuration > DOM Element.
- Under “Selection Method”, you can either use a “CSS Selector” or “ID”. Learn more about how to find a CSS selector.
- Tip: If your CSS variables change frequently, add an HTML ID to your site and use the ID variable.
- Enter the CSS selector or ID name. You can leave the “Attribute name” field blank.
- Name the DOM Element variable.
- Click Save. Your screen will then return to the “User-Provided Data” settings.
- Name the User-Provided Data variable and click Save.
- The “User-Provided Data” variable settings screen will then close and you’ll be redirected back to the “Google Ads User-provided Data Event” setup.
- In “Triggering”, set up should be done when the conversion should be counted:
- To add a new trigger, select the + in the upper right corner.
- Select a trigger that happens after the form has been filled out. For example, form submissions.
- Select All Forms.
- Name the trigger.
- Click Save.
- Name and save your new “Google Ads User-Provided Data Event” tag. Your tag should look similar to this:
Set up enhanced conversions for leads using the data layer in Google Tag Manager
Step 1: Identify and define your enhanced conversions variables
The data layer is a JavaScript object to pass data safely from your website into Tag Manager. To use the data layer, you need to collect and save data in key-value pairs and use dataLayer.push() to make it available to Tag Manager. In Tag Manager, you can use data layer variables to retrieve the stored data and let your tags use it.
Ensure that collected email or phone numbers are available to your data layer. If the user information is collected on a previous page or iframe, you’ll need to make sure it’s available in a variable to your data layer when it's called.
You can either send unhashed data, which Google will hash before the data reaches the servers, or pre-hashed data. If you decide to send pre-hashed data, please encode the data using hex-encoded SHA256. In either case, provide at least one of the following fields: email or phone_ number.
To push unhashed data to the data layer:
- On your website, store user-provided data as key-value pairs in a JavaScript variable. For example:
var leadsUserData = {
'email': 'name@example.com',
'phone_number': '+11234567890',
'address': {
first_name: 'John',
last_name: 'Doe',
street: '123 Lemon',
city: 'Some city',
region: 'CA',
country: 'US',
postal_code: '12345',
},
};
- Send the user data together with an event using dataLayer.push(). For example:
<script>
dataLayer.push({
'event': 'formSubmitted',
'leadsUserData': {
'email': 'name@example.com',
'phone_number': '+11234567890',
'address': {
first_name: 'John',
last_name: 'Doe',
street: '123 Lemon',
city: 'Some city',
region: 'CA',
country: 'US',
postal_code: '12345',
},
},
});
<script>
The variable leadsUserData is now available in Google Tag Manager.
To push pre-hashed data to the data layer:
- On your website, hash user-provided using hex-encoded SHA256. The key for encoded data needs to start with sha256_. For example:
{'sha256_email_address':await hashEmail(email.trim()),
}
- Send the user data together with an event using dataLayer.push(). The example below shows a data layer implementation that assumes you have written a hashing function yourself, which you run asynchronously.
<script>
dataLayer.push({
'event': 'formSubmitted',
'leadsUserData': {
'sha256_email_address': await hashEmail(email.trim()),
'sha256_phone_number': await hashPhoneNumber(phoneNumber),
'address': {
sha265_first_name: await hashString(firstname),
sha256_last_name: await hashString(lastname),
sha256_street: await hashString(streetAddress),
postal_code: '12345',
},
},
});
<script>
The variable leadsUserData is now available in Google Tag Manager.
Step 2: Enable enhanced conversions for leads in Google Tag Manager and create custom javascript variable
- Open Google Tag Manager
- In your "Workspace", click Tags from the navigation menu.
- Click New to create a new tag and select Google Ads User-Provided Data Event.
- In "Tag Configuration":
- In the field “Conversion ID”, supply your Google Ads Google Ads customer ID.
- Under “User-provided data”, select New Variable.
- Create a new User-Provided Data variable.
- Set the "Type" to "Code".
- For the relevant user data field you want to provide, click the dropdown menu and select New Variable.
- Under “Choose Variable Type”, select Data Layer Variable.
- In the Data Layer Variable, reference your stored user data. For example, leadsUserData.
- Click Save.
- In “Triggering”, set up should be done when the conversion should be counted:
- To add a new trigger, select the + in the upper right corner.
- Select a trigger that happens after the form has been filled out. For example, form submissions.
- Select All Forms.
- Name the trigger.
- Click Save.
- Name and save your new "Google Ads User-Provided Data Event" tag.
3. Verify your setup and publish your tag
Before you publish your container, make sure that the tag behaves as intended using Preview mode. Additionally, you can also validate user data hashing if you are familiar with networking and hashing algorithms.
Validate your tag setup using Preview mode
To validate your setup with Preview mode, follow these steps:
- In your Tag Manager workspace, click the Preview button at the top. A new tab opens with Tag Assistant.
- Enter your website’s URL in Tag Assistant. Tag Assistant opens your website and the Tag Assistant summary. Keep both tabs open.
- On your website, fill out your form.
- Check the "Tag Assistant" summary. Your Google Ads User-Provided Data Event tag should be listed under the "Tags Fired" section in the summary.
- If your tag is listed under "Tags Not Fired", you need to adjust the tag’s trigger settings.
- Click on the tag to see which values were passed to the tag. Check if your input was received. If the tag did not receive any input:
- Verify your implementation method
- If another tag fires before the Google Ads User-Provided Data Event tag, edit the "Form Submission" trigger. Set the "Wait for Tags" option.
Validate user data hashing using network calls
To validate that user data is submitted hashed using Google Chrome, follow these steps:
- Open your website and navigate to the form field you want to validate.
- Open the developer tools.
- Open the console settings and check the "Preserve Log" box.
- To make validation easier, clear any pre-existing network logs.
- With your Network tab in the developer tools open, submit the data to the form field that you want to validate.
- Result: You should see a request sent to https://google.com/pagead/form-data/ with a page parameter em=xyz. The em parameter contains the hashed user data.
What hashed data looks like
Suppose a user entered a raw email address (abc@example.com) in the form:
- If the Google Ads User-Provided Data Event tag received the raw user data, the user data will be hashed by the tag using web-safe Base64 encoded SHA256.
- If you pre-hash user data before making it available to the Google Ads User-Provided Data Event tag, use Hex encoded SHA256.
Once your tag collects the data you need, Submit your changes in Tag Manager.
Step 2: Import your conversions into Google Ads
3 ways to import your data:
You should import your conversions into Google Ads using the Google Ads Data Manager. Offline conversion import is a legacy feature, and it doesn’t have the durability features that enhanced conversions for leads offers. Google Ads Data Manager simplifies connecting and activating your first party data through a new interface available within Google Ads. It enables advertisers to import and activate their first party data across two use cases and supported connectors. If your connector isn’t supported by Google Ads Data Manager, you can set up using a third-party integration like Zapier.
Implementation varies depending on what you're measuring and your capabilities. Follow our guide to upgrading offline conversion imports to determine the method that best fits your needs.