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 use the Google tag to set up enhanced conversions for leads measurement on your website using the Google tag. If you use Google Tag Manager, view set up enhanced conversions for leads using Google Tag Manager. If you want to learn more about the benefits of enhanced conversions for leads and how they work, check out About enhanced conversions.
- When enhanced conversions for leads are enabled, the associated Google tag will automatically capture relevant form interaction events on your website.
- For Google Cloud Storage (GCS), Amazon S3, HTTP, SFTP, and gSheets, Google Ads Data Manager imports conversions from 90 days ago. For Salesforce and HubSpot, Data Manager imports the last 14 days of data only in the first run. After the first successful run, Data Manager imports all changes that occurred and were reported between the last successful run and now. For other connectors, Data Manager will import the last 14 days of data for each run.
Before you begin
Before setting up enhanced conversions for leads, you’ll need to identify your website lead forms and pick a field from the form that uniquely identifies your leads. You should provide multiple identifiers when you configure enhanced conversions for leads on your website and when you later import the conversions. Since each parameter can have a significant impact on the accuracy of conversions that are reported, we also require you send the GCLID along with your first-party customer data.
Required:
- Email: API and Manual File users see hashing requirements
- Google Click ID (GCLID) or GBRAID: Continue to send the GCLID/GBRAID if you store it already and/or capture it with your Google tag.
- Conversion name: The name of the conversion action (or example, 'lead qualified' or 'contract signed') that you’d like to import offline data for.
- Conversion Time: Choose one of the accepted time formats.
- Conversion Goal: For lead gen advertisers measuring offline goals, use Qualified or Converted lead goals
Recommended:
- Phone Number: Optional; API and Manual File users see hashing requirements
- Order ID: This helps control duplicate leads.
- Conversion Value: Optional, but recommended.
- Conversion Currency: (optional)
- If you’re using Google Ads Data Manager learn more about preparing your data for 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 remove symbols and dashes, but the number must contain a country code.
You'll also need to:
- Note the URL where the lead form on your website is located. You may need this information during setup.
- Make sure that auto-tagging is enabled. Auto-tagging is necessary to import offline conversions.
- Make sure that there is first-party customer data available (email and/or phone number) on your website lead form.
- Ensure that you have reviewed and confirmed that you can comply with the customer data policies in Google Ads (view steps on this below).
If you’re currently using offline conversion imports, we highly recommend upgrading to enhanced conversions for leads using the Google Ads Data Manager. Enhanced conversions for leads is an upgraded offline conversion import that offers benefits like greater durability, more accurate reporting and engaged-view conversions, cross-device conversions and is supported in Data Manager, Google Ads API, and 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.
Instructions
Here's an overview of the steps for setting up offline conversion imports using enhanced conversions for leads:
1. Configure Google tag settings
For enhanced conversions with leads, you’ll need to adjust the Google tag:
- Open the Google tag settings.
- In the Google tag settings, click Manage automatic event detection. Enable automatic collection for "Form interactions".
- Close the menu.
Next, you'll need to import your offline conversion data into Google Ads by uploading or linking to a file through Google Ads, by using Data manager.
2. Create a new conversion action
- In your Google Ads account, click the Goals icon
.
- Click the Conversions drop down in the section menu.
- Click Summary.
- Click + Create conversion action.
- Select Import in the "New conversion action” page.
- Select CRMs, files, or other data sources and then Track conversions from clicks.
- In the “Data Source” section, select Connect a new data source. Select a featured product or type a product’s name in the search bar. You can choose to connect data sources via:
- Direct connection: Selecting this option will make the “Customer data” section appear. Click the checkbox regarding Google’s EU user consent policy and Customer data policies to proceed.
- Third-party integration by Zapier: When you select this option, an Authorize button will appear. Click Authorize to confirm that you agree with using a third-party integration that might include fees.
- Click Continue.
- Select a “Conversion goal” using the Select category dropdown and type a name for your conversion.
- Note: It’s highly recommended to choose either “Qualified lead” or “Converted lead” as your conversion goal.
- Click Save and continue. The next page will confirm your new conversion action.
- Note: If you initially skipped connecting data sources, click Set up in the “Set up data sources” section.
- Click Done.
- Check the box to Turn on enhanced conversions for leads. If you don’t want enhanced conversion for leads, you can click Continue with Google click identifiers or Finish setup later. If you’d like to turn it on after you’ve set up your conversion action, you can Click Summary. In the enhanced conversions for leads drop down, check the box to Turn on enhanced conversions for leads
3. Accept Customer data terms
If you haven’t yet accepted the Customer data terms, you can review and accept them by following these instructions:
- In your Google Ads account, click the Goals icon
.
- Click the Conversions drop down in the section menu.
- Click Settings.
- Next to “Customer data terms”, select View Terms and review the “Policies and Additional Terms for Customer Data”.
- Click the “I have read and accept the terms on behalf of my company” checkbox.
- Click Agree. You’ll notice your status is updated to “Accepted”.
Set up enhanced conversions for leads using Javascript or CSS selectors
If you’re using Javascript variables, it’s likely easiest to ask your developer which variables should be added to these fields. If you’re using CSS Selectors, you can follow the steps below.
Find enhanced conversions fields on your lead form page
- Using the Chrome browser in a separate tab from your Google Ads account, navigate to your lead form submission page.
- Identify the fields where customer data is entered on the page that you wish to send to Google.
Required:
- Email: API and Manual File users see hashing requirements
- Google Click ID (GCLID) or GBRAID: Continue to send the GCLID/GBRAID if you store it already and/or capture it with your Google tag.
- Conversion name: The name of the conversion action (or example, 'lead qualified' or 'contract signed') that you’d like to import offline data for.
- Conversion Time: Choose one of the accepted time formats.
- Conversion Goal: For lead gen advertisers measuring offline goals, use Qualified or Converted lead goals
Recommended:
- Phone Number: Optional; API and Manual File users see hashing requirements
- Order ID: This helps control duplicate leads.
- Conversion Value: Optional, but recommended.
- Conversion Currency: (optional)
- If you’re using Google Ads Data Manager learn more about preparing your data for import.
- Once you’ve identified the customer data fields on the page, you’ll need to follow the next step to copy the CSS Selectors and enter those into Google Ads.
Identify enhanced conversions CSS Selectors and input into Google Ads
- On your lead form page, when you've found the corresponding customer data you want to send, use your mouse to right-click on top of it and select Inspect.
Note: If you're inputting the CSS selector for email in Google Ads, make sure you right-click the email address displayed on your lead form page.
- You'll notice the Chrome Developer Tools launch within your Chrome browser.
- Within the source code presented in the Chrome Developer Tools page, a portion of the code will be highlighted. This highlighted code is the portion which includes the CSS Selectors for the customer data you right-clicked in Step 2 of this section.
- Hover your mouse over the highlighted code and right-click it.
- Scroll down to “Copy” and then choose Selector.
- Paste that text in the Google Ads automatic enhanced conversions section (on your other tab) in the corresponding field.
- For reference, it should look something similar to but not exactly like this:
tsf > div:nth-child(2) > div.A8SBwf > div.RNNXgb > div > div.a4bIc > custEmail
- For reference, it should look something similar to but not exactly like this:
- Complete steps 2-6 of this section for each different customer data type (email or phone)
- In your Google Ads account, click Save.
Note: It is a best practice to use the ID attribute to retrieve the value from a DOM element. IDs are unique and less likely to change over time than other properties, such as class names or names. They also aren’t affected by layout changes, which means that your code will still work even if the layout of your page changes.
If a field doesn’t already have an ID, you can add one by using the id
attribute in the HTML. For example:
<input type="text" id="myTextField">
Set up enhanced conversions for leads by editing your website code
You can implement enhanced conversions for leads with custom Javascript code to call the Google tag directly (forms hosted by a third-party tool or iFrame may require this) instead of automatic detection or through selectors. Learn more about how to Validate your implementation using Chrome Developer Tools.
Identify and define your enhanced conversions fields
Ensure your email or phone number are available to your custom code. You can either send unhashed data, which Google will normalize and hash before the data reaches the servers, or normalized and hashed data. If you decide to normalize and hash the data, follow the below instructions.
For normalization:
- Remove leading and trailing whitespaces.
- Convert the text to lowercase.
- Format phone numbers according to the E.164 standard.
For hash:
- Use hex SHA256.
The table below lists more information about the fields you can define. The “Key Name” column indicates how they'll be referenced in the enhanced conversions HTML snippet, which is created in the next step. Note, all data should be passed as String types.
Data Field | Key Name | Description |
Email address | email |
User email. Example: ‘jdoe@example.com’ |
sha256_email_address |
Hashed user email. Example: ‘a8af8341993604f29cd4e0e5a5a4b5d48c575436c38b28abbfd7d481f345d5db’ |
|
Phone number | phone_number |
User phone number. Must be in E.164 format, which means it must be 11 to 15 digits including a plus sign (+) prefix and country code with no dashes, parentheses, or spaces. Example: ‘+11231234567’ |
sha256_phone_number |
Hashed user phone number. Example: ‘e9d3eef677f9a3b19820f92696be53d646ac4cea500e5f8fd08b00bc6ac773b1’ |
Implement the enhanced conversions script
Configure and add the following script to where you want the Google tag to fire. Ensure you update variable names below to match the variable names for those attributes on your web page.
For example, if you store email in a variable named “email_address”
then the snippet should be edited to reflect that (for example, where it says yourEmailVariable)
// Implement the user-provided data object
<script>
gtag('set', 'user_data', {
"email": yourEmailVariable,
***Change yourEmailVariable to the actual Javascript variable name where you are storing the user’s email data. Do the same for the other variables below. Make sure the values aren't hashed.
"phone_number": yourPhoneVariable,
***The phone number must be in E.164 format, which means it must be 11 to 15 digits including a plus sign (+) prefix and country code with no dashes, parentheses, or spaces.
});
</script>
// Send the user-provided data using the following code snippet
<script>
gtag('event', 'form_submit', {'send_to': 'AW-ID'});
***Keep AW-
as is and change ID
to your Google tag ID
</script>
If your site doesn't collect one of the above fields, remove the field entirely rather than leaving it blank. For example, a website that only collects emails would look like this:
// Implement
<script>
gtag('set', 'user_data', {
"email": {{ yourEmailVariable }}
});
</script>
Multiple values
Developers can optionally provide multiple values (up to 3 for phone and email and 2 for address) by using an array value rather than a string. If you capture more than one value, providing this will increase the likelihood of a match. Check the example below:
<script>
gtag('set', 'user_data', {
"email": [yourEmailVariable1, yourEmailVariable2],
"phone_number": [yourPhoneVariable1, yourPhoneVariable2]
});
</script>
Example code for providing pre-hashed user data would look like this:
// Implement
<script>
gtag('set', 'user_data', {
"sha256_email_address": {{ yourEmailVariable }},
"sha256_phone_number": {{ yourPhoneVariable }}
});
</script>