For subtitles in your language, turn on YouTube captions. Select the settings icon at the bottom of the video player, then select "Subtitles/CC" and choose your language.
Enhanced conversions is a feature that can improve the accuracy of your conversion measurement. It supplements your existing conversion tags by sending hashed first party conversion data from your website in a privacy safe way. The feature uses a secure one-way hashing algorithm called SHA256 on your first party customer data, such as email addresses, before sending to Google. The hashed data is then matched with signed-in Google accounts in order to attribute your campaign conversions to ad events, such as clicks or views. You can learn more about how enhanced conversions work.
You can set up enhanced conversions with minor or no changes to your tagging configuration, in one of two ways: using Google Tag Manager or the Google tag.
This article will explain how you can set up enhanced conversions manually using Google Tag Manager and common issues with validation and implementation.
If you would like to implement enhanced conversions with the Google tag, read the instructions to set up enhanced conversions manually with the Google tag.Before you begin
- Make sure you have Google Ads conversion tracking set up using Google Tag Manager.
- Conversions measured by importing Google Analytics goals are not supported for enhanced conversions. If you would like to use enhanced conversions, consider setting up a new Google Ads conversion action with a Google tag or Google Tag Manager.
- Know the conversion page URL where the conversion tag fires (for example, the confirmation page URL) and the conversion event trigger (for example, a button click or a page view).
- If your first party customer data (email, full name and home address, and/or phone number) is available on the page where your conversion tracking tag fires, you can use one of the “standard” methods listed below, or the code-based method if you prefer. If, however, first party customer data isn’t available on the page where your conversion tracking tag fires, you must use the user-provided data event tag in combination with automatic or manual methods, or use the code-based method.
- This implementation requires knowledge of how conversion tracking is set up on your website and some code changes, so make sure you are able to speak with your development team as needed.
- Ensure that you’ve reviewed the customer data policies and agree to the enhanced conversion terms of service and policies in Google Ads (view steps on this below, under Instructions).
Enhanced conversions impact reporting
We’ve made a series of updates to help you better understand the impact of enhanced conversion to your reporting. You can now see the impact of your enhanced conversions with new results available in your conversion action table. Learn more about enhanced conversions for web impact results
Before accepting the terms of service, make sure you already have a conversion tracking tag set up in your Google Tag Manager container you plan to use for enhanced conversions or else your container may not properly be enabled for enhanced conversions.
Instructions
- Sign in to your Google Ads account.
- In the upper right corner of your account, click the tools icon
, and under "Measurement," click Conversions.
- Open the conversion action you want to use for setting up enhanced conversions.
- In the “Enhanced conversions” section at the bottom, click Turn on enhanced conversions.
- Select ”Google tag or Google Tag Manager” to set up enhanced conversions.
- Click Agree to the compliance statement. By turning on enhanced conversions you confirm that you comply with our policies. The Google Ads Data Processing Terms apply to your use of enhanced conversions.
- Click Check URL to check your website for a Google tag.
- In “Tag type” you should be defaulted to Google Tag Manager if that is how you track conversions for this conversion action. Because you used Google Tag Manager to set up website tags, you need to use it to set up enhanced conversions. Follow the instructions below to complete enhanced conversions setup Google Tag Manager.
Note: If you see both Google Tag Manager and the Google tag listed as options, choose whichever tag type you’re most comfortable with. If you have no preference, we recommend using the Google tag.
- Click Save.
Complete enhanced conversions setup in Google Tag Manager
If you currently use Google Tag Manager for conversion tracking, you can implement enhanced conversions with slight changes to your configuration. There are 3 ways in which you can implement enhanced conversions in Google Tag Manager:
- Automatic collection: This method allows the tag to automatically detect user-provided data on the page. This method requires minimal effort and works well for most advertisers. For more control, consider adding a code snippet to your website or specifying CSS selectors or Javascript variables.
- Manual Configuration: Manually specify CSS selectors or Javascript variables, such as data layer variables, on your page that contain relevant user-provided data. If you frequently change your website code, in particular the formatting or CSS Selectors on your conversion page, you may want to consider using data layer variables instead or the “Code” option, as changing your website formatting could disrupt the CSS Selector method.
- Code: Add a code snippet on your website that sends hashed customer data for matching. This method takes more time but is the best choice for maximizing the accuracy of enhanced conversions by ensuring that you consistently send properly formatted data whenever your conversion tag fires.
After you complete setup in Google Tag Manager you can validate your implementation to make sure enhanced conversion is set up correctly.
Set up enhanced conversions using “automatic collection” in Google Tag Manager
You can set up automatic enhanced conversions in 2 different ways:
- Standard automatic enhanced conversions: Use this method when user-provided data (email, phone number, or address) is available on the conversion event page. For example, if your conversion event page is the purchase confirmation page and user email is visible on that page, use this method.
- Automatic enhanced conversions with the user-provided data event tag: Use this method when customer data (email, phone number, or address) is not available on the conversion event page, but is available on a previous page. For example, if your conversion event page is the purchase confirmation page and user email is entered on a page prior to the purchase confirmation page, use this method.
Set up standard automatic enhanced conversions
- Sign in to your Google Tag Manager account.
- Click Workspace, then click Tags from the navigation menu.
- Select the Google Ads conversion tracking tag that you’d like to implement enhanced conversions with and edit that tag.
- Make sure that this conversion action has the same conversion tracking ID and label as the conversion action that you enabled enhanced conversions for in your Google Ads account.
- Click Include user-provided data from your website.
- In the dropdown, select New Variable or use an existing variable if you’ve already set one up.
- Select Automatic collection.
- Click Save for the variable and then save the conversion tracking tag.
Set up automatic enhanced conversions with the user-provided data event tag
- Sign in to your Google Tag Manager account.
- Click Workspace, then click Tags from the navigation menu.
- Click New to create a new tag.
- Click Tag Configuration and select Google Ads User-Provided Data Event.
- Fill in your Google Ads Conversion Tracking ID.
- Make sure that this conversion action has the same conversion tracking ID and label as the conversion action that you enabled enhanced conversions for in your Google Ads account.
- In the dropdown select New Variable.
- Select Automatic.
- Name the variable.
- Click Save.
- Click Triggering in the Google Ads User-Provided Data Event Tag. This is where you anticipate that the user data will be available.
- Click the plus icon
- Click Trigger Configuration.
- Click Form Submission.
Note: You must select “form submission” for enhanced conversions to work properly.
- Select All Forms.
- Select Save and then save your new Google Ads User-Provided Data Event tag.
Set up enhanced conversions using “manual configuration” in Google Tag Manager
Find enhanced conversions variables
- Using the Chrome browser, navigate to the page where user-provided data appears.
- User-provided data may appear on the conversion page of your website or on a page that comes before the conversion page, such as a form submission page that comes before your purchase confirmation page. Identify any customer data that is displayed on the page that you wish to send to Google. As an example, your page may display a thank you message and include a customer email address after a purchase.
Note: At least one of the following fields must be provided:
- Email (preferred)
- Address - First name, last name, postal code, and country are required.
- Optional: Street address, city, and region as additional match keys.
- A phone number can also be provided as a standalone match key but is recommended to be sent along with an email.
- User-provided data may appear on the conversion page of your website or on a page that comes before the conversion page, such as a form submission page that comes before your purchase confirmation page. Identify any customer data that is displayed on the page that you wish to send to Google. As an example, your page may display a thank you message and include a customer email address after a purchase.
- Once you have identified the customer data on the page, you will now need to follow the next step to copy the CSS Selectors and enter those into Google Tag Manager (or utilize existing data layer variables if they already exist) so your enhanced conversion tag knows which pieces of data to hash and send to Google. It’s important you keep this conversion page tab open.
Enable enhanced conversions in Google Tag Manager
In a separate tab, open Google Tag Manager.
You can set up manual enhanced conversions in 2 different ways:
- Standard manual enhanced conversions: Use this method when user-provided data (email, phone number, or address) is available on the conversion event page. For example, if your conversion event page is the purchase confirmation page and user email is visible on that page, use this method.
- Manual enhanced conversions with the user-provided data event tag: Use this method when user-provided data (email, phone number, or address) is not available on the conversion event page, but is available on a previous page. For example, if your conversion event page is the purchase confirmation page and user email is entered on a page prior to the purchase confirmation page, use this method. In this method, you’ll identify CSS selectors and Javascript variables that contain user-provided data on pages that come before the conversion page.
Set up standard manual enhanced conversions
- Sign in to your Google Tag Manager account.
- Click Workspace, then click Tags from the navigation menu.
- Select the Google Ads conversion tracking tag that you’d like to implement enhanced conversions with and edit that tag.
- Make sure that this conversion action has the same conversion tracking ID and label as the conversion action that you enabled enhanced conversions for in your Google Ads account.
- Click Include user-provided data from your website.
- In the dropdown, select New Variable or use an existing variable if you’ve already set one up.
- Select Manual configuration.
- You may also select “Code” if you would like to use Custom Javascript or other data objects to send your data through Google Tag Manager. This method requires data to be formatted in a particular way, so if you’d like to do this, you can read the “Code” instructions below. Here you will see “User provided data” at the top of the page, followed by all the pieces of customer data which you can include as part of your enhanced conversion tag.
- For the relevant user data field that you would like to provide via enhanced conversions, click on the dropdown menu and select New Variable.
Note: If you already have unhashed 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.
- In the “Variable Configuration” screen, select Choose a variable type to begin setup. In the “Choose Variable Type” screen, select DOM Element.
- Back on the “Variable Configuration” screen, change “Selection Method” in the dropdown to “CSS Selector.”
- Give your variable a title.
- Enter the CSS selector that references your users’ data into the “Element selector” input field (see section below on how to find the CSS Selector). You can leave the “Attribute name” field blank. (more on this below).
- Click Save for the variable and then save the conversion tracking tag.
Set up manual enhanced conversions with the user-provided data event tag
- Sign in to your Google Tag Manager account.
- Click Workspace, then click Tags from the navigation menu.
- Click New to create a new tag.
- Click Tag Configuration and select Google Ads User-Provided Data Event.
- Fill in your Google Ads Conversion Tracking ID.
- Make sure that this conversion action has the same conversion tracking ID and label as the conversion action that you enabled enhanced conversions for in your Google Ads account.
- In the dropdown select New Variable.
- Select Manual configuration.
- You may also select “Code” if you would like to use Custom Javascript or other data objects to send your data through Google Tag Manager. This method requires data to be formatted in a particular way, so if you’d like to do this, you can read the “Code” instructions below. Here you will see “User provided data” at the top of the page, followed by all the pieces of customer data which you can include as part of your enhanced conversion tag.
- For the relevant user data field that you would like to provide via enhanced conversions, click on the dropdown menu and select New Variable.
Note: If you already have unhashed 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.
- In the “Variable Configuration” screen, select Choose a variable type to begin setup. In the “Choose Variable Type” screen, select DOM Element.
- Back on the “Variable Configuration” screen, change “Selection Method” in the dropdown to “CSS Selector.”
- Give your variable a title.
- Enter the CSS selector that references your users’ data into the “Element selector” input field (see section below on how to find the CSS Selector). You can leave the “Attribute name” field blank. (more on this below).
- Click Save.
- Click Triggering in the Google Ads User-Provided Data Event Tag. This is where you anticipate that the user data will be available.
- Click the plus icon
- Click Trigger Configuration.
- Click Form Submission.
Note: You must select “form submission” for enhanced conversions to work properly.
- Select All Forms.
- Select Save and then save your new Google Ads User-Provided Data Event tag.
The next step will show you how to copy the CSS Selectors from your conversion page and paste them into these enhanced conversions variables. It’s important you keep this page tab open.
Identify enhanced conversions CSS Selectors and input into Google Tag Manager
To identify the CSS Selectors to input into the enhanced conversion tag fields (for example, email, phone, etc.), please follow these steps. If you already have unhashed variables in your data layer, you can select those instead of creating new CSS variables. If you aren’t sure, continue through the instructions:
- Navigate back to your website (don’t close your Google Tag Manager page).
- Identify the customer data you want to send with enhanced conversions. This data may appear on the conversion page or may appear on another page, such as the form submission page just before the purchase confirmation page. Use your mouse to right-click on top of it and select Inspect.
- For example, if you are trying to capture an email address, make sure you are right clicking the email address (for example, example@email.com)
- You will see the Chrome Developer Tools launch within your Chrome browser.
- Within the source code presented in the Chrome Developer Tools page, you will see a portion of the code highlighted. This highlighted code is the page element where you need to extract 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, then choose Copy Selector.
- In your other tab, with Google Tag Manager open, paste that text in the “Element selector” 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:
- Click Save.
- Repeat steps 2-8 of this section for each different piece of customer data (for example, email, name and address, etc.), by copying the CSS Selector into a new variable for each customer data variable in Google Tag Manager.
- In Google Tag Manager, click Save.
Set up enhanced conversions using “Code” in Google Tag Manager
Identify and define your enhanced conversions variables
First you’ll need to make sure the variables you need like email, address, and phone number are available on the conversion page where the Google Ads conversion tag fires. This will likely be the case on conversion pages for purchases, sign-ups, and other similar conversion types, which often require customer data. If you are unsure which page this is, you should contact your developer.
Once you’ve confirmed that the information is available, you’ll need to store that customer data on your page as global javascript variables, so they can be used by the enhanced conversions tag (which we’ll get to in the next section).
Note: At least one of the following fields must be provided:
- Email (preferred)
- Address - First name, last name, postal code, and country are required. You can optionally provide street address, city, and region as additional match keys.
- A phone number can also be provided as a standalone match key but is recommended to be sent along with an email
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, please follow the below instructions.
For normalization:
- Remove leading/trailing whitespaces.
- Convert the text to lowercase.
- Format phone numbers according to the E.164 standard.
For hash:
- Please use hex SHA256.
The table below lists more information about the customer data variables you can define. You can name the variables however you’d like, and the “Key Name” column indicates how they will be referenced in the enhanced conversions tag (more about that in the next step). Note, all data should be passed as String type variables. Also, when defining name and address, make sure to define each component as an individual variable (for example, first name, last name).
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’ |
|
First name | address.first_name |
User first name. Example: 'John' |
address.sha256_first_name |
Hashed user first name. Example: ‘96d9632f363564cc3032521409cf22a852f2032eec099ed5967c0d000cec607a’ |
|
Surname | address.last_name |
User last name. Example: 'Doe' |
address.sha256_last_name |
Hashed user last name. Example: ‘799ef92a11af918e3fb741df42934f3b568ed2d93ac1df74f1b8d41a27932a6f’ |
|
Street address | address.street |
User street address. Example: '123 New Rd' |
City | address.city |
User city name. Example: `Southampton’ |
Region | address.region |
User province, state, or region. Example: `Hampshire’ |
Postal code | address.postal_code |
User post code (6- and 7- digit version) Example: 'SO99 9XX' |
Country | address.country |
User country code. Example: 'UK'. Use 2-letter country codes, per the ISO 3166-1 alpha-2 standard. |
The next steps will be to enable enhanced conversions in Google Tag Manager and reference the customer data variables you just created. It may be helpful to keep the names of your customer data variables handy, as you’ll need them in future steps.
Enable enhanced conversions in Google Tag Manager and create custom javascript variable
- Sign in to your Google Tag Manager account.
- Click Workspace, then click Tags from the navigation menu.
- Select the Google Ads conversion tracking tag you’d like to implement enhanced conversions with and edit that tag
- If you haven’t set up your Google Ads conversion tracking tag in your Google Tag Manager account, read Google Ads conversions.
- Make sure this conversion action has the same conversion tracking ID and label as the conversion action you enabled enhanced conversions for in your Google Ads account.
- Click Include user-provided data from your website.
- Click Select user-provided data variable, then select New Variable.
- In the new “User Provided data variable”, select Code at the bottom.
- Under “Choose Variable Type,” select Custom Javascript.
- Copy the following code into the custom Javascript variable:
function () {
return {
"email": yourEmailVariable , // replace yourEmailVariable with variable name that captures your user’s email
"phone_number": yourPhoneVariable , // repeat for yourPhoneVariable and following variable names below
"address": {
"first_name": yourFirstNameVariable
"last_name": yourLastNameVariable ,
"street": yourStreetAddressVariable ,
"city": yourCityVariable ,
"region": yourRegionVariable ,
"postal_code": yourPostalCodeVariable ,
"country": yourCountryVariable
}
}
}
Code samples for normalized and hashed variables:
Note: You can also hardcode the field with a string or use a function instead of using variables.// Implement
<script>
gtag('set', 'user_data', {
"sha256_email_address"
: yourNormalizedandHashedEmailVariable
"sha256_phone_number"
: yourNormalizedandHashedPhoneVariable,
"address": {
"address.sha256_first_name"
: yourNormalizedandHashedFirstNameVariable,
"address.sha256_last_name"
: yourNormalizedandHashedLastNameVariable,
"city"
: yourCityVariable,
"region"
: yourRegionVariable,
"postal_code"
: yourPostalCodeVariable,
"country"
: yourCountryVariable
}
});
</script>If you would like to provide hashed user data values, you can use the following example snippet:
async function processUserData() {
const userData = {
'sha256_email_address'
: await hashEmail(email.trim()),
'sha256_phone_number'
: await hashPhoneNumber(phoneNumber),
'address': {
'address.sha256_first_name'
: await hashName(firstName),
'address.sha256_last_name'
: await hashName(lastName),
'city'
: city,
'region'
: region,
'postal_code'
: postalCode,
'country'
: country,
},
};
return userData;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, brackets or spaces.
- For each type of customer data in the code above, replace the placeholder variables (for example, yourEmailVariable) with the name of the global javascript variable containing that piece of customer data on your conversion page.
- As a reminder, at least one of the following fields must be provided:
- Email (preferred)
- Address (first name, last name, postal code, country are required)
- A phone number can also be provided as a standalone match key but is recommended to be sent along with an email.
- Note that if your site doesn't collect one of those fields, remove the field entirely rather than leaving it blank. For example, a website that only collects emails and phone numbers would create a custom javascript variable that looks like this:
function () {
return {
"email": yourEmailVariable ,
"phone_number": yourPhoneVariable
}
}
- As a reminder, at least one of the following fields must be provided:
- Click Save.
You have now set up enhanced conversions for that conversion action. The next step is to validate that it’s working properly. Go to the “Validate your implementation” section below.
Validate your implementation
To verify if your enhanced conversions implementation is working correctly, navigate to your conversion page (you may have to complete a test conversion to do this), and follow these steps. It’s best practice to do this immediately after implementing enhanced conversions so any changes can be made if it's not working properly.
Validate your implementation using Chrome Developer Tools
- Right click on your web page.
- Select Inspect.
- Select the “Network” tab.
- Enter “google” in the search bar.
- Find the network request that's going to "googleadservices.com/pagead/conversion/" (or "google.com/pagead/1p-conversion/" on some browsers).
- Click Payload to view the list of query string parameters.
- Look for a parameter “em” with a hashed string as the value. The value should start with “tv.1~em” followed by a long string of characters. If you see the "em" parameter, this means that the enhanced conversions tag is picking up and hashing the enhanced_conversion_data object.
After 72 hours, review the Diagnostics report to confirm your implementation
- Sign in to your Google Ads account.
- In the upper right corner of your account, click the tools icon
, and under "Measurement", click Conversions.
- Click the conversion action that has enhanced conversions enabled.
- Select Diagnostics from the page menu at the top. You’ll be able to see your enhanced conversions tag diagnostics report and the metrics for your enhanced conversions in each section.
- Review the various health checks to make sure everything is working as expected.
- If the tag diagnostics report notifies you that something may be wrong, follow the instructions in the notification and the Help Center to troubleshoot.