Tracking Enhanced Conversions - Meta Data Support Requirements

This article is a guide to implement Google Analytics enhanced conversions.

Difficulty - 79-799197_crossed-wrench-clipart.png79-799197_crossed-wrench-clipart.png79-799197_crossed-wrench-clipart.png 

-Code changes required to support data layer.

Enhanced Conversions were introduced by Google Analytics to improve the accuracy of conversion measurement and improve ads bidding. First-party customer data, like email address, is collected and shared with google via secure one-way hashing algorithm (SHA256). Google combines user-submitted data with data from Google accounts to provide additional information about user demographics and interests. 

California Law regulates the data that can be shared with third parties. Enhanced conversions comply with these regulations by hashing and collecting 1st party data. 

mceclip0.png

User-Provided Data - a new utility variable type was introduce to support the encryption of user-submitted data. This variable is attached to Google Ads Conversion Tracking Tags.

mceclip1.png

mceclip9.png

Implementation - Google Ads

The first step is to enable enhanced conversion from you Google Ads account.

  1. Sing in to your Google Ads Account
  2. Click TOOLS AND SETTINGS > Measurement > Conversions
  3. Open the conversion action you with to enhance
  4. Open the conversion action you want to use for setting up enhanced conversions.
  5. Click Turn on enhanced conversions.

Implementation - Web/App

Collecting user-submitted data can be done in two ways -

  1. DOM Scraping - collecting the values put into specific fields. This can be hard to maintain and less accurate.
  2. Data Layer - pushing user-submitted data to the data layer for collection by Google Tag Manager (GTM). This method is considered best practice. 

The data layer is an objected used for sharing data from your site with Google via Google Tag Manager (Documentation). 

Utilizing data layer is more accurate because data is programmatically submitted and it is more maintainable because tracking is less likely to break due to code updates. 

User PII is not automatically collected and sent to Google Analytics after pushing said data to the data layer. Instead, it is made available for collection as a data layer variable in GTM. The data layer variable is included as a User-Provided Data Variable. Finally, the User-Provided Data variable is attached to the Conversion Tracking Tag. 

Data Layer Push

The window.dataLayer object has a method called push() that allows you to easily upload structured data for collection by Google Tag Manager (GTM).

Below is an example a data layer push which includes user-submitted data to support enhanced conversions. The important part to focus on is the user dictionary, other details are for demonstration purposes.

dataLayer.push({
  'event': 'purchase',

   'ecommerce': { … }, //omitted for brevity
  'data':
  {
    user: {
    emailAddress: '<<USER_EMAIL>>',
    phoneNumber: '<<USER_PHONE>>',
firstName: '<<USER_FIRST_NAME>>',
    lastName: '<<USER_LAST_NAME>>',
    street: '<<USER_STREET>>',
    city: '<<USER_CITY>>',
    region: '<<USER_STATE>>',
    country: '<<USER_COUNTRY>>',
    postalCode: '<<USER_POSTAL_CODE>>'
    }
  } 
})

User-Provided Data

The User-Provided Data variable is a requirement for enhanced conversions. It is how Google manages encryption of this data. There are two ways to configure this variable:

  • Manual
  • Code

User-Provided Data: Manual Configuration

As you can see below, the user data dictionary (push above) matches the user-submitted data requirements for enhanced conversions. 

mceclip2.png

In this example, each data layer variable is collected individually, using the dot (.) accessor to drill down to the exact variable (e.g., "data.user.city").

mceclip3.png

Implementation Steps:

  1. Capture each user-submitted value with a Data Layer Variable (ex. above)
  2. Match each Data Layer Variable with the corresponding User-Submitted Variable requirement under Manual Configuration and Save (two images past)
  3. Add the User-Provided Data Variable to your Conversion Tag (below)

mceclip8.png

User-Provided Data: Code Configuration

In the previous example (Manual Configuration), each individual variable was capture and mapped to the corresponding User-Submitted Variable required key. When using Code Configuration, you can provide just one structured data object. This method lends itself to the data layer push implementation. 

With this approach, you should create a data layer variable for the data.user dictionary, which contains all user-submitted data, and provide that to the User-Provided Data Variable. 

Implementation Steps:

  1. Capture the data dictionary with a Data Layer Variable (img1)
  2. Input the Data Layer Variable from Step 1 into the User-Provided Data Variable under Code Configuration and Save (img2)
  3. Add the User-Provided Data Variable to your Conversion Tag (img3)

img1 - dlv - data.user

mceclip5.png

img2 - User-Provided Data Var

mceclip6.png

img3 - Google Ads Conversion Tracking Tag with User-Submitted Data Var

mceclip7.png

Validation

After implementing data layer support requirements and implementing enhanced conversions in Tag Manager, you may follow the following steps to validate your implementation. 

From within the same Google Tag Manager workspace where you have created these variables, click Preview and input the URL where data layer support has been implemented.

Perform the actions required to complete a conversion and check Tag Assistant to ensure that user-submitted values were captured.

The example below is of a Manually Configured Conversion Tag using the data layer push provided above. 

From Tag Assistant, find the tag and ensured it has fired when expected. Select 'Values' next to 'Display Variables as' then ensure that the values collected exactly match what was pushed to the data layer. 

mceclip4.png

That's it! Now all that is left is to submit your Tag Manager workspace. 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.