Enhanced conversions for leads uses first-party user-provided data from your website to measure sales and transactions that happen off your website. If you run lead-generation campaigns to drive offline sales, enhanced conversions for leads can help you understand the impact of your ad spend.
Unlike the current version of offline conversion tracking, this version of offline conversion tracking doesn’t require you to modify your lead forms or customer relations management (CRM) systems to store Google Click ID (GCLID). Instead, it uses user-provided data from your website leads to measure conversions.
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.
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. At least one of the following variables must be provided when you configure enhanced conversions for leads on your website and when you later import the conversions:
- Email (preferred)
- A phone number
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).
Instructions
Here's an overview of the steps for setting up offline conversion imports using enhanced conversions for leads:
1. Create a new conversion action
- Sign in to your Google Ads account.
- Click the tools icon
in the upper right corner of your account.
- Under “Measurement”, click Conversions.
- Click the plus button icon
to create a new conversion action.
- Select Import in the new “Conversion action” page.
- Select Other data sources or CRMs and then Track conversions from clicks. Click Continue.
- Enter the settings for this conversion action. For details on the settings, check out Set up offline conversion imports.
- Click Create and Continue. The next page will confirm your new conversion action.
- Select Enhanced conversions for leads. If you’re using Google Tag Manager, select Enhanced conversions for leads (via Google Tag Manager).
- Before you can finish, you’ll need to accept the customer data terms and complete the Google tag configuration.
2. Accept Customer data terms
- 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 Save. You’ll see your status updated as “Accepted”.
3. Configure Google tag
- Next to “Global site tag configuration”, click Configure.
- In the “Details” section, ensure the Google tag is installed on your website.
- In the “Configuration” section, ensure you’ve included user data.
- Click “Allow user-provided data capabilities”.
- Select how you’d like to include user-provided data:
- Automatic collection. This automatically inspects the page for strings that match a pattern for email addresses. You can also click the “Exclude some CSS selectors from automatic collection” checkbox to limit automatic collection to certain pages, forms or parts of your site.
- Specify CSS selectors or JavaScript variables on your page.
- Add a code snippet to your website. Add JavaScript code to your website that sends an event.
- If your transactions are related to sensitive categories, you should use manual configuration to ensure that sensitive data isn’t shared with Google.
- To measure website leads that convert offline, your tag can include user-provided data with lead form events to simplify the import process. Configure how the user-provided data is included. Google is committed to protecting the confidentiality and security of the data you share with us. Learn more about customer data policies
- Click Save. You can see your statuses are updated.
- Click Done.
Next, you’ll need to import conversions from ad clicks into Google Ads.
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.
Note: At least one of the following fields must be provided for enhanced conversions to work properly:
- An email (preferred)
- A phone number
- 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 see 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 and/or phone)
- In your Google Ads account, click Save.
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.
Identify and define your enhanced conversions fields
Ensure your email or phone number are available to your custom code.
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 Javascript snippet, which is created in the next step. Note, that all data should be passed as String types.
Data Field | Key Name | Description |
Email address | email |
User email. |
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. |
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)
Note: You can also hardcode the field with a string or use a function instead of using variables.
// Implement
<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,
});
</script>
- 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.
- 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>