Measure conversions and key events

Conversions are customer actions that are important to your business, such as purchases or sign-ups. You can use conversion measurement to see how effectively interactions with your ads lead to valuable customer activity.

Measure conversions with Google Ads

Conversion measurement helps show you what happens after a customer interacts with your ads — whether they purchased a product, signed up for your newsletter, called your business, or downloaded your app.

gtag.js

  1. Before you set up conversion measurement in Google Ads, create a conversion action.
  2. On the resulting screen, under Google tag, select the option that best describes your situation and follow the instructions for tag installation. Learn more about installing the Google tag
  3. (Optional) Modify the Google tag based on your preferences:

    • If you don't want the Google tag to add website visitors to your remarketing lists on initial page load, add the following code to the 'config' command on your Google tag:

      gtag('config', 'TAG_ID', {'send_page_view': false});
      
    • If you don't want to collect remarketing data, add the following gtag('set') command to your Google tag, above the gtag('js') command. This disables the collection of remarketing data for all configured Google Ads accounts.

      <script async
      src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>
      <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('set', 'allow_ad_personalization_signals', false);
      gtag('js', new Date());
      gtag('config', 'TAG_ID');
      </script>
      
  4. Next to "Event snippet", select whether to measure conversions on a page load or a click.

    • Page load: Count conversions when customers visit the conversion page, such as a confirmation page for a purchase or sign-up. This is the default and most common option. Learn more about Google's security standards.
    • Click: Count conversions when customers click a button or link (such as a "Buy Now" button).
  5. Copy the event snippet, then follow the instructions to add it to your website, or click Download snippet to add it later.

    • If you measure conversions by page load, add the event snippet to the page.
    • If you measure conversions by click, add the event snippet to the page that has the button or link you’d like to monitor for clicks.

    The Ads event snippet uses gtag('event', 'conversion', ...) to mark an event as a conversion. Conversion events send an object with send_to, value, and currency parameters. An example is shown below:

    <script>
     gtag('event', 'conversion', {
       'send_to': 'AW-123456789/AbC-D_efG-h12_34-567',
       'value': 1.0,
       'currency': 'USD'
     });
    </script>
    
  6. Click Next and then Done.

  7. If you measure clicks on your website as conversions, follow these instructions to add an additional piece of code to the button or link you’d like to measure. This step is required for conversion measurement to work.

Tag Manager

  1. In Tag Manager, create a Google Ads tag. From the home screen, select New Tag > Tag Configuration > Google Ads Conversion Tracking.
  2. Sign in to your Google Ads account to get the values that you will use to complete the tag setup:
    1. In your Google Ads account, click Tools and Settings ()
    2. Select Measurement: Conversions, which opens to the Conversion Actions table.
    3. Select the name of the conversion that you want to use from the Conversion action column.
    4. Expand the tab for Tag setup to view the tag details.
    5. Select Use Google Tag Manager.
    6. Copy the tag ID and Conversion Label.
    7. Add the required tag ID and Conversion Label values to their respective fields. You may optionally add a Conversion Value, Order ID, and Currency Code. Be sure to use Tag Manager variables for these field values whenever applicable. For example, most cases will use a variable for Order ID.
  3. Choose one or more triggers in the Triggering section to specify when the tag should fire.
  4. Save and publish your container.
  5. Ensure that a conversion linker is enabled.
  6. Preview your changes, and publish when ready.

Measure key events with Google Analytics 4

To set up key event measurement with Google Analytics 4 properties, do the following:

gtag.js

  1. Send the event that you would like to mark as a key event. (Note:* Many types of events are collected automatically.)*

    gtag('event', 'login', {
      'method': 'Google'
    });
    
  2. In Google Analytics, mark the event as a key event.

Tag Manager

  1. Set up a GA4 Event tag to send the type of event you want to mark as a key event. (Note:* Many types of events are collected automatically.)* a key event. (Note:* Many types of events are collected automatically.)*
  2. In Google Analytics, mark the event as a key event.

Measure conversions with Display and Video 360 and Campaign Manager 360

Conversions in Display and Video 360 and Campaign Manager 360 are measured with Floodlight tags. The Floodlight Counter tag is used to count the number of times that users have visited a particular page after an ad is viewed or clicked, and the Floodlight Sales tag is used to measure the quantity and value of purchases. To set up conversion measurement with Floodlight tags, select an option below:

gtag.js

Floodlight tags may be copied from within Display and Video 360 and Campaign Manager 360. Each installation involves a standard Google tag to set up the data connection to your product, and an event tag that gathers the data you want. The steps are as follows:

  1. Install the Google tag. Replace DC-XXXXXX in this example with a valid configuration ID, or copy the tag from within your product.

    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=DC-XXXXXX"></script>
    <script>
     window.dataLayer = window.dataLayer || [];
     function gtag(){dataLayer.push(arguments);}
     gtag('js', new Date());
    
     gtag('config', 'DC-XXXXXX');
    </script>
    
  2. Send the event that you would like to mark as a conversion with gtag('event', ...).

    The event tag should be placed on pages with events you would like to mark as conversions. Place the event tag after the global snippet, within the <head> section.

    The fields in the event snippet are different depending on the tag type, counting method, and other data that is passed to the tag.

    The event tag can be copied from within your product. An example is shown below:

    <script>
      gtag('event', 'conversion', {
        'allow_custom_scripts': true,
        'u1': '[variable]',
        'send_to': 'DC-[floodlightConfigID]/[activityGroupTagString]/[activityTagString]+[countingMethod]'
      });
    </script>
    <noscript>
    <img src="https://ad.doubleclick.net/ddm/activity/src=[floodlightConfigID];type=[activityGroupTagString];cat=[activityTagString];dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord=1?" width="1" height="1" alt=""/>
    </noscript>
    

Tag Manager (Counter)

There are two ways to add Floodlight Counter tags to a container:

  • Accept a tag that has been pushed from the Campaign Manager 360 user interface.
  • Use the Floodlight Counter tag template.

Accept a pushed Floodlight tag

A Floodlight Counter tag can be pushed directly to your container from the Campaign Manager 360 user interface. When a Floodlight tag is pushed to Tag Manager, you need to approve the link request and pushed tag(s).

To accept a pushed Floodlight tag:

  1. Navigate to Approval Queue > Tags.
  2. Click the activity name. Some parameters (e.g. the values for "src= ", "type= ", and "cat= ") will be pre-set.
  3. Make desired modifications to the tag, then click Approve.
  4. Ensure that a conversion linker is enabled.
  5. Save and publish your container.

Floodlight custom variables are key-values that can be used to track data that you collect about your users. Custom Floodlight variables use the keys u1=, u2=, etc. For pushed tags, Tag Manager variable names will be pre-populated in the custom variable fields To configure these variables to pass the appropriate data, map them to Tag Manager variables.

Learn more about Floodlight approvals.

Create a new Floodlight Counter tag

To create a new Floodlight Counter tag manually:

  1. In Tag Manager, click Tags > New.
  2. Click Tag Configuration and select the Floodlight Counter tag type.
  3. To gather the values required for tag configuration, open another browser window and sign in to Campaign Manager 360. Click Advertisers, and then click the name of the advertiser. Enter these values in your new Tag Manager Floodlight Counter tag:
    • Advertiser ID: The Advertiser ID will appear on the advertiser details page just below the advertiser's name. This value is also found as the value of src= in a generated Floodlight tag.
    • Group Tag String: In the Activity table, identify the activity you want to work with and find the group tag string listed in a column to the right. This is also found as the value of type= in a generated Floodlight tag.
    • Activity Tag String: In the Activity table, identify the activity you want to work with and find the activity tag string listed in a column to the right. This is also found as the value of cat= in a generated Floodlight tag.
  4. Set the desired Counting Method:
    • Standard: Counts every conversion.
    • Unique: Counts the first conversion for each unique user during each 24-hour day, from midnight to midnight, Eastern Time (US).
    • Per session: Counts one conversion per user per session. Session length is set by the site where the Floodlight tag is deployed.
  5. For legacy implementations that use them, enter values for the U and Tran variables.
  6. Enter any Custom Variables that you need for your implementation. Floodlight custom variables are key-value pairs that can be used to capture additional data about your users. The keys are formatted as "u1=", "u2=", etc. Click +Custom Variable to add a new key value pair. For each custom variable, select a Tag Manager variable that contains the value that you would like to pass to the Floodlight custom variable.
  7. Click Triggering and select a trigger that corresponds to the landing page for your campaign where you would like the tag to fire.
  8. Ensure that a conversion linker is enabled.
  9. Save and publish your container.

Tag Manager (Sales)

There are two ways to add Floodlight Sales tags to a container:

  • Accept a tag that has been pushed from the Campaign Manager 360 user interface.
  • Use the Floodlight Sales tag template.

Accept a Floodlight tag pushed from Campaign Manager 360

Floodlight tags pushed from Campaign Manager 360 can be added directly to your Tag Manager container. To allow this, approve the link request and pushed tag(s):

  1. Navigate to Admin > Approval Queue > Tags.
  2. Click the activity name. Some parameters (e.g. the values for src=, type=, and cat=) will be predefined.
  3. The Revenue parameter value is populated with a cost Tag Manager variable. Create and configure a cost variable that retrieves the revenue amount. If you already have a variable created that captures the transaction revenue, change cost to the name of that variable.
  4. The Order ID parameter value is populated with an {{ord}} Tag Manager variable. Create and configure an {{ord}} variable that retrieves the order ID (or, if Item Sold is the counting method, configure this variable to be a count of the number of items sold.) If you already have a variable that captures the order ID, change {{ord}} to the name of that variable.
  5. Floodlight custom variables are key-value pairs that can be used to collect usage data. Custom Floodlight variables use the keys _u1=, _u2=, etc. For pushed tags, variable names will be populated in the custom variable fields. Map these custom Floodlight variables to Tag Manager variables so that their values can be passed to your Floodlight tag.
  6. Make desired modifications to your Floodlight tag, then click Approve.
  7. Ensure that a conversion linker is enabled.
  8. Save and publish your container.

Read Approvals to learn more.

Use the Floodlight Sales tag template

To set up a new Floodlight Sales tag manually:

  1. Click Tags > New.
  2. Click Tag Configuration > Floodlight Sales.
  3. To gather the values required for tag configuration, open another browser window and sign in to Campaign Manager 360. Click Advertisers, and then click the name of the advertiser. Enter these values in your new Tag Manager Floodlight Sales tag:
    • Advertiser ID: The Advertiser ID will appear on the advertiser details page just below the advertiser's name. This value is also found as the value of src= in a generated Floodlight tag.
    • Group Tag String: In the Activity table, identify the activity you want to work with and find the group tag string listed in a column to the right. This is also found as the value of type= in a generated Floodlight tag.
    • Activity Tag String: In the Activity table, identify the activity you want to work with and find the activity tag string listed in a column to the right. This is also found as the value of cat= in a generated Floodlight tag.
  4. For Revenue, select a variable that contains the revenue amount. For Order ID, select a variable that contains the order ID. If you have selected Item Sold as the Counting Method, select a variable that contains a count of the number of items sold. Create these variables in Tag Manager if they do not already exist.
  5. Floodlight custom variables are key-value pairs that can be used to collect data about user activity. Custom Floodlight variables use the keys _u1=, _u2=, etc. For each custom variable, select a Tag Manager variable that contains the value you want to pass to the Floodlight custom variable.
  6. Select a trigger that corresponds to a purchase event, or create one if it doesn’t already exist. There are several ways of creating triggers which depend on your site, your goals, and your Tag Manager implementation. For example: Page view triggers are commonly used to help fire tags on purchase confirmation pages. For the trigger filter, add the URL of the purchase confirmation page. Or, use the data layer to push a custom event (dataLayer.push({ 'event': 'purchase' });) and set up your trigger as a custom event trigger with the event condition set to 'purchase'.
  7. When you have completed entering the tag information, click Save.
  8. Ensure that a conversion linker is enabled.
  9. Save and publish your container.

Learn more about Google tag instrumentation for Display and Video 360 and Campaign Manager 360.