Set up conversion tracking for your website

Conversion tracking can help you see how effectively your ad clicks lead to valuable customer activity on your website, such as purchases, sign-ups, and form submissions.

This article explains how to create a conversion action to track customer actions on your website.

Before you begin

Here's what you'll need before you can set up website conversion tracking:

  • A website: This is where you'll put the conversion tracking code, called a "tag."
  • Ability to edit website: Either you or your web developer will need to be able to add the tag to your website.

This article goes right to the setup instructions. To learn more about how conversion tracking works and why to use it, read About conversion tracking.

Or, if you're not sure if website conversion tracking is right for you, you can find instructions for all the different kinds of conversion tracking here.

Instructions

Step 1: Create a conversion action

  1. Sign in to your Google Ads account.
  2. In the upper right corner, click the tools icon Google Ads | tools [Icon], and under "Measurement," click Conversions.
  3. In the summary, click + New conversion action.
  4. Choose from the 4 kinds of conversions sources you can track, Website, App, Phone calls, or Import.
  5. Select Website, then click Next.
  6. Enter your website domain and click Scan in order to:
    • Detect if your website has a global site tag
    • View a list of URLs that you can track as conversions

You can now set up conversion actions in 2 ways:

  • Set up conversions using a URL - Use this method if you want to track a page load as a conversion and you don't need to customize your conversion tracking setup. This is the fastest and easiest way to set up a conversion action.
  • Set up a conversion manually - Use this method if you need to track clicks on buttons or links, or you want to customize your event tag with value tracking, transaction IDs, or other custom parameters.

Method 1: Set up a conversion with a URL

  1. If you see a list of suggested URLs, you may click Accept Suggestion to track one of the suggested URLs as a conversion.
  2. To add your own URL, click Add URL.
    • Select the conversion goal that best matches the URL you'd like to track as a conversion.
    • Select the option that best matches your URL: (for example: www.mydomain.com/home).
      • URL is (default, exact match)
      • URL starts with (www.mydomain.com…)
      • URL contains (mydomain.com/home… )
    • Enter the URL of the conversion page on your website (for example, a "Thank you" page after a purchase, a click that subscribes to your newsletter or service).
    • Click Add.
  3. Click Settings if you'd like to edit the settings for any of the URLs you added:
    • Next to "Goal and action optimization", you can choose the goal the conversion counts towards from the drop-down menu.
    • Click Conversion action optimization options to determine whether this is a primary action for bidding optimization and reporting, or a secondary action used for observation.
    • Next to "Conversion name", enter a name for the conversion you'd like to track, such as "newsletter sign up" or "wedding bouquet purchase". This will help you recognize this conversion action later in conversion reports.
    • Next to "Value", select how to track the value of each conversion.
      • Use the same value for each conversion. Enter the amount each conversion is worth to your business.
      • Use different values for each conversion. Use this option if, for example, you're tracking purchases of products with different prices. Later, when you add your conversion tracking tag, you'll need to customize your tag to track transaction-specific values.
      • Don't use a value for this conversion action (not recommended).
    • Next to "Count", select how to count these conversions.
      • Every: This setting is best for sales, when every conversion likely adds value for your business.
      • One: This setting is best for leads, such as a sign-up form on your website, when only one conversion per ad click likely adds value for your business.
    • Click on Click-through conversion window to select how long to track conversions after an ad interaction from the drop-down. For Search, Shopping, and Display campaigns, the window can be 1 to 90 days. Learn more about conversion windows.
    • Click Engaged-view-through conversion window to select how long to track view-through conversions from the drop-down. For Search, Shopping, and Display campaigns, the window can be 1 to 30 days.
    • Click Attribution model. Attribution models can give you a better understanding of how your ads perform and can help you optimize across conversion journeys. Learn more about Attribution models.
    • Click Save and continue.
  1. Click Save and continue. You'll be taken to the next step where you'll set up tagging if needed.

Note: This conversion action will be applied by default to the campaigns in your account as long as the conversion goal is set as an account-default goal and the conversion action is set as "primary".

Method 2: Set up a conversion manually

  1. Go to the section "Create and install conversions manually (advanced)" and click + Create conversion.
  2. Next to "Goal and action optimization", you can choose the goal the conversion counts towards from the drop-down menu.
  3. Click Conversion action optimization options to determine whether this is a primary action for bidding optimization and reporting, or a secondary action used for observation.
  4. Next to "Conversion name", enter a name for the conversion you'd like to track, such as "newsletter sign up" or "wedding bouquet purchase". This will help you recognize this conversion action later in conversion reports.
  5. Next to "Goal", select the action you'd like to track. A goal is a conversion you want to maximize by launching campaigns. You will be able to use these categories to organize and segment your campaign reports.
  6. Next to "Value", select how to track the value of each conversion.
    • Use the same value for each conversion: Enter the amount each conversion is worth to your business.
    • Use different values for each conversion: Use this option if, for example, you're tracking purchases of products with different prices. Later, when you add your conversion tracking tag, you'll need to customize your tag to track transaction-specific values.
    • Don't use a value for this conversion action (not recommended)
  7. Next to "Count", select how to count these conversions.
    • One: This setting is best for leads, such as a sign-up form on your website, when only one conversion per ad click likely adds value for your business.
    • Every: This setting is best for sales, when every conversion likely adds value for your business.
  8. Click on Click-through conversion window. Select how long to track conversions after an ad interaction from the drop-down. For Search, Shopping, and Display campaigns, the window can be 1 to 90 days. Learn more about conversion windows.
  9. Click Engaged View-through conversion window. Select how long to track view-through conversions from the drop-down. For Search, Shopping, and Display campaigns, the window can be 1 to 30 days.
  10. Click Attribution model. Attribution models can give you a better understanding of how your ads perform and can help you optimize across conversion journeys. Learn more about Attribution models.
  11. Click Save and continue.

Note: This conversion action will be applied by default to the campaigns in your account as long as the conversion goal is set as an account-default goal and the conversion action is set as "primary".

Step 2: Set up your conversion tag

If you created your conversion action using a URL, you'll see one of the following screens:

  • If you've set up a global site tag, you'll see a screen confirming that your conversion action is now set up.
  • If you haven't set up a global site tag, you'll see a screen with instructions to set up your global site tag.

If you set up your conversion action manually, you'll see one of the following screens:

  • If you've set up a global site tag, you'll see instructions to add an event snippet.
  • If you haven't set up global site tag, you'll see instructions to add both a global site tag on every page on your website and an event snippet for this conversion action.

Installing the global site tag

The global site tag adds website visitors to your "All visitors" remarketing lists (if you've set up remarketing) and sets new cookies on your domain, which will store information about the ad click that brought someone to your site. Note that your Google Ads conversion tracking tag will be able to use this click information to attribute a conversion to your Google Ads campaigns. Please ensure you're providing users with clear and comprehensive information about data collection, and obtaining consent where legally required.

You must install the global site tag on every page of your website, but you need only one global site tag for each Google Ads account.

Choose from the following 2 ways to install your tag:

Option 1: Install the tag yourself

  1. Under "Global site tag," select the option that best describes your situation and follow the instructions for installing the tag:
    • I haven't installed the global site tag on my website : Choose this option if it's your first time setting up the tag for a conversion action in your account and you haven't installed the global site tag from another Google product. This option shows the full global site tag. To install the tag, copy the tag code and paste it between the <head></head> tags of every page of your website.

      Here's an example of a global site tag, where "AW-CONVERSION_ID" stands for the conversion ID that's unique to your Google Ads account:

      <script async
      src="https://www.googletagmanager.com/gtag/js?id=AW-CONVERSION_ID"></script>

      <script>

      window.dataLayer = window.dataLayer || [];

      function gtag(){dataLayer.push(arguments);}

      gtag('js', new Date());

      gtag('config', 'AW-CONVERSION_ID');

      </script>

    • I installed the global site tag on my website from another Google product (example: Google Analytics) or from another Google Ads account: If this option applies to you, you won't need to add the global site tag to your website again; however, for conversion tracking to work for this account, you'll need to add the config command (the piece of code that contains your conversion ID) to every instance of the global site tag. This option shows that command, where "AW-CONVERSION_ID" stands for your account's conversion ID:

      gtag('config', 'AW-CONVERSION_ID');

      Add the config command to every instance of the global site tag on your website, right above the </script> end tag.

      Here's an example of a global site tag that's configured for both Google Analytics and Google Ads, with the config command for the Google Ads account highlighted:

      <script async
      src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID">

      </script>

      <script>

        window.dataLayer = window.dataLayer || [ ] ;

        function gtag(){dataLayer.push(arguments);}

        gtag( 'js', new Date () ) ;

        gtag( 'config', 'GA_TRACKING_ID');

      gtag( 'config', 'AW-CONVERSION_ID');

      </script>

    • I already installed the global site tag on my website when I created another conversion action in this Google Ads account: If this option applies to you, you don't need to add the global site tag again to your website. Just make sure that the global site tag appears on every page of your site and confirm that the config command in each instance of the tag contains your account's conversion ID. You'll see your conversion ID when you select this option

  2. (Optional) Modify the global site tag based on your preferences:
    • If you don't want the global site tag to add website visitors to your remarketing lists on initial page load, add the highlighted portion below to your global site tag's 'config' command:
      gtag('config',' AW-CONVERSION_ID',{'send_page_view': false});

    • If you don't want the global site tag to set first-party cookies on your site's domain, add the highlighted portion below to your global site tag's 'config' command:
      gtag('config',' AW-CONVERSION_ID',{'conversion_linker': false});

      Note

      We don't recommend doing this as it will lead to less accurate conversion measurement.

    • If you want to disable the collection of remarketing data, add the highlighted gtag('set') command to your global site tag above the gtag('js') command. This will disable the collection of remarketing data for all configured Google Ads accounts.

      <script async
      src="https://www.googletagmanager.com/gtag/js?id=AW-CONVERSION_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', 'AW-CONVERSION_ID');

      </script>

  3. Copy the global site tag, then follow the instructions to add it to your website.

  4. Next to "Event snippet," select whether to track conversions on a page load or 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're tracking conversions by page load, add the event snippet to the page you're tracking.
    • If you're tracking conversions by click, add the event snippet to the page that has the button or link you'd like to track for clicks.
  6. Click Next.
  7. Click Done.
  8. If you're tracking clicks on your website as conversions, follow the instructions in Track clicks on your website as conversions to add an additional piece of code to the button or link you'd like to track. This step is required for conversion tracking to work.

Option 2: Use Google Tag Manager

Google Tag Manager is a tag management system that allows you to quickly and easily update tags and code snippets on your website. You can use Google Tag Manager to install your conversion tracking tag.

  1. Copy the Conversion ID and Conversion label (shown in this tab) for your conversion action.
  2. Follow the instructions to set up Google Ads conversion tracking in Google Tag Manager. Important: To ensure proper tracking in all browsers, make sure you add a Conversion linker tag and configure it to fire on all of your webpages.
  3. Click Next.
  4. Click Done.
  5. If you're tracking clicks on your website as conversions, you'll need to complete additional setup steps in Google Tag Manager. This is required for conversion tracking to work. Choose one of the 2 options below:
  • Basic: Set up a click trigger so the conversion tracking tag fires when the relevant click occurs.
  • Advanced: Add a function call to the code for the link, button, or button image. Then, set up a custom event trigger so the conversion tracking tag fires when the event (in this case, a click) occurs.

Tip: Install the conversion tracking tag with Google Tag Manager

Instead of manually adding the conversion tracking tag to your website code, you can use Google Tag Manager to install the tag. You'll need to provide the following information:

  • Conversion ID
  • Conversion label

You'll find this information in the event snippet for your conversion action. In the sample snippet below, AW-CONVERSION_ID stands for the conversion ID unique to your account, while AW-CONVERSION_LABEL stands for the conversion label, which is unique per conversion action.

                          <!-- Event snippet for Example conversion page -->  <script>  gtag('event', 'conversion', {'send_to': 'AW-CONVERSION_ID/AW-CONVERSION_LABEL',  'value': 1.0,  'currency': 'USD'  });  </script>                        

Informing your site visitors about data collection

As always, please ensure you're providing users with clear and comprehensive information about the data you collect on your websites, and getting consent for that collection where legally required.

Security and privacy for website tracking

Google's security standards are strict. Google Ads only collects data on pages where you have deployed the associated tags.

Please ensure you're providing users with clear and comprehensive information about the data you collect on your websites, and getting consent for that collection where legally required.

Was this helpful?

How can we improve it?