Set up enhanced conversions for web manually with Google Tag Manager

For subtitles in your language, turn on YouTube captions. Select the settings icon Image of YouTube 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.

Note: 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 (e.g. the confirmation page URL) and the conversion event trigger (for example, a button click or a page view).
  • Make sure there is first party customer data available (email, full name and home address, and/or phone number) on the page where your conversion tracking tag fires.
  • 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).
Note:
  • 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

  1. Sign in to your Google Ads account.
  2. In the upper right corner of your account, click the tools icon Google Ads | tools [Icon], and under "Measurement," click Conversions.
  3. Open the conversion action you want to use for setting up enhanced conversions.
  4. In the “Enhanced conversions” section at the bottom, click Turn on enhanced conversions.
  5. Select ”Google tag or Google Tag Manager” to set up enhanced conversions.
  6. 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.
  7. Click Check URL to check your website for a Google tag.
  8. 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 set up enhanced conversions manually with Google Tag Manager.
  9. Click Save.

Note: Once you have accepted the Terms of Service, it can take up to 5 days for your Google Tag Manager account to be enabled for enhanced conversions. Make sure your conversion tracking tag is set up in Google Tag Manager and then check back in 5 days to see the enhanced conversions functionality enabled.

Set up enhanced conversions manually using 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 two primary ways in which you can implement enhanced conversions in Google Tag Manager:

  1. Using Automatic collection (if available). Read Set up automatic enhanced conversions.
  2. Using “Manual Configuration” with CSS Selectors or existing data layer variables - no code changes required on your page (recommended if Automatic isn't available)
    • This is the easiest way to implement enhanced conversions with Google Tag Manager because this usually requires no code changes on your page as long as you have customer data available on your conversion page (for example, an email).
    • 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 below, as changing your website formatting could disrupt the CSS Selector method.
  3. Using the “Code” method to send all data in a single data object - code changes may be required on your page
    • You can implement enhanced conversions as a single data object using javascript variables on your conversion page as long as the customer data you would like to pass in the enhanced conversions tag (for example, email, phone numbers, etc.) is defined in global Javascript variables on your conversion page.
    • This method is useful if you prefer to pass the information using javascript variables or if the customer data isn't available on the conversion page (for example, it is available on previous pages and needs to be passed to the conversions page). It is also preferable if you frequently change the formatting on your website, as it’s more resilient to code changes.

Set up enhanced conversions manually in Google Tag Manager

Find enhanced conversions variables on your conversion page

  1. Using the Chrome browser, navigate to your conversion page.
    • The conversion page is the page where the conversion you are trying to measure with enhanced conversions (for example, purchases from Page A) is being tracked using your existing conversion tracking tag. If you are unsure which page this is, you should contact your developer. 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 will need to be provided for enhanced conversions to work properly:

      • Email (preferred)
      • Address (first name, last name, postal code, country are required if you choose to use this data)
      • [Optional] A phone number can also be provided along with an email, or full name and address (but not by itself)
  2. 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.

  1. Sign in to your Google Tag Manager account.
  2. Click Workspace, then click Tags from the navigation menu.
  3. 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.
  4. Click Include user-provided data from your website.
  5. Click the "Select user-provided data variable" dropdown, and then click New Variable.
  6. Select Manual configuration (recommended).
    • 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.
  7. 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.
  8. In the “Variable Configuration” screen, select Choose a variable type to begin setup. In the “Choose Variable Type” screen, select DOM Element.
  9. Back on the “Variable Configuration” screen, change “Selection Method” in the dropdown to “CSS Selector.”
  10. Give your variable a title.
  11. 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).

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:

  1. Navigate back to your conversion page tab (don’t close your Google Tag Manager page).
  2. On your conversion page, when you have found the corresponding customer data you want to send with enhanced conversions, 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 (e.g. example@email.com) displayed on your conversion page.
  3. You will see the Chrome Developer Tools launch within your Chrome browser.
  4. 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.
  5. Hover your mouse over the highlighted code and right-click it.
  6. Scroll down to Copy, then choose Copy Selector.
  7. 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

  8. Click Save.
  9. 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.
  10. 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 along with an email, or full name and address.

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 (in custom javascript variable below) Description
Email address email User email
Phone number phone_number User phone number. The tag will remove symbols and dashes, but the number must contain country code.
First name address.first_name User first name. Example: “John”
Last name address.last_name User last name. Example: “Doe”
Street address address.street User street address. Example: “123 Main St”
City address.city User city name. Example: “San Francisco”
Region address.region User province, state, or region. Example: “California” or “CA”
Postal code address.postal_code User post code (5-digit version only). Example: “12345”
Country address.country User country code. Example: “US”. Use two-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

  1. Sign in to your Google Tag Manager account.
  2. Click Workspace, then click Tags from the navigation menu.
  3. 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.
  4. Click Include user-provided data from your website.
  5. Click Select user-provided data variable, then select New Variable.
  6. In the new “User Provided data variable”, select Code at the bottom.
  7. Under “Choose Variable Type,” select Custom Javascript.
  8. 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

    }

    }

    }

  9. 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)
      • Phone number (must be provided in addition to one of the other two pieces of information above)
    • 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

      }

      }

  10. 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.

Common issues

If you are unable to validate your enhanced conversions implementation, you should go back through the setup instructions to ensure that all necessary steps were followed. If you’re still having trouble, below is a list of common reasons why you may be encountering issues with your enhanced conversions implementation.

No tag detected

If you see a “no tag detected” error when trying to initially activate enhanced conversions, you have an error in your website URL or Google tag:
  • Check the spelling of the URL.
  • If you don't have conversion tracking tags in place using the Google tag or Google Tag Manager, you should implement conversion tracking with one of those methods.
  • If you’ve installed Google tag on your website, you can select one manually and indicate if it uses the Google Tag or Google Tag Manager. You may need to troubleshoot your sitewide tagging to ensure you have properly implemented conversion tracking using one of those two methods.

Multiple tags are detected

Choose one of the tags that are listed in the dialog box. If you have Google tag and Google Tag Manager, the “Google tag” is recommended.

Enhanced conversions data isn't available at the time of conversion

In some cases, enhanced conversions data may not be available at the time of conversion, like when that information is collected on another domain (for example, paying through a third-party domain) or if it is collected elsewhere in the conversion flow (for example, signed-in customers may not reenter their first-party information, or it may be collected on the previous page).

Pre-hashed data is being provided in your enhanced conversions

We use the SHA256 algorithm to hash the first party data you provide with your enhanced conversions. SHA256 is the industry standard for one-way hashing of data. At this time, enhanced conversions doesn't support advertisers pre-hashing their data--the Google tag perform this hashing for you.

Variables weren't successfully implemented for enhanced conversions

For Google Tag Manager users: review the steps above related to creating variables properly to make sure that you did so correctly. Also ensure that those are the ones referred to when configuring enhanced conversions in Google Tag Manager and that they are populated with data by the time of conversion.

Code copying errors

Double check that all enhanced conversions code on your page and/or variable names entered into Google Tag Manager are correct. If you implemented enhanced conversions using javascript variables, make sure the custom javascript snippet was copied correctly and then updated to reflect your variable names (and not placeholder information). If you used CSS Selectors, make sure that you selected the correct Selector and properly copied the selector information as described in the steps above.

Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Search
Clear search
Close search
Google apps
Main menu
Search Help Center
false
false
true
true
73067
false