Set up offline conversion tracking

Google Ads conversion import lets you see what happens in the offline world after someone clicks your ads. This article will go over how to set up your Google Ads account and website for tracking offline conversions. After you’ve followed these instructions, you can then import your conversions into Google Ads.

This article jumps right into the instructions. If you want to learn more about the benefits of offline conversion tracking and how it works, read About offline conversion tracking.

If you want to import conversions from Salesforce, follow these instructions to link your Google Ads and Salesforce accounts and track when your Google Ads campaigns lead to milestones in your sales funnel.

Before you begin

To import offline conversions for your business, you'll want to make sure the following applies to you:

  • You've enabled auto-tagging. This lets you import offline conversions.
  • You can make code changes to all of your web pages. This lets you capture the GCLID (Google Click Identifer) parameter that's appended to the URL that people click through from one of your ads.
  • You can store each GCLID with the corresponding prospect's information that's gathered on your website. You'd want to be able to do this, for example, in your lead tracking system.
  • You have a click-to-conversion cycle that is less than 90 days. Conversions uploaded more than 90 days after the associated last click won't be imported by Google Ads and will therefore not show up in your conversion statistics.

Instructions

There are 2 parts to setting up imports for offline conversion tracking: creating a conversion action in your Google Ads account, and configuring your website and lead tracking system. Follow both sets of instructions below.

Part 1: Create one or more import conversion actions

You'll need to create a new conversion action for each kind of offline conversion you'd like to measure, such as "lead qualified" or a "deal won." You can measure as many offline conversion actions as you want.

Here's how to create a new offline conversion action:
  1. Sign in to your Google Ads account.
  2. Click the tools icon  in the upper right corner of your account.
  3. Under “Measurement,” click Conversions.
  4. Click the plus button  to create a new conversion action.
  5. You'll now see options for the different kinds of conversion sources you can track. Click Import.
  6. Select Other data sources or CRMs, then select Track conversions from clicks or Track conversions from calls.
  7. Click Continue.
  8. Enter a name for the conversion action you're creating (it's important that you remember the exact name and spelling because you'll need to enter this name later, when you upload your offline conversion information).
  9. Click the Category drop-down and select the category that best describes your conversions. You can use this category to segment your conversion reports. You can always change it later.
  10. In the "Value" section, select how to track the value of each conversion.
  11. In the "Count" section, select how to count your conversions.
  12. Click Conversion window. Select how long after an ad click you want to track conversions for this conversion action. The window can be 1 to 90 days.
  13. (Advanced) Click Include in "Conversions." Uncheck this setting—selected by default—if you don't want to include data for this conversion action in your “Conversions” and "Conversion value" columns. If you uncheck this setting, data will still be included in the “All conversions” column.
  14. You may want to use this setting if you use an automated bid strategy to optimize for conversions, and you don't want to include this particular conversion action in your bid strategy. Learn more about the "Include in 'Conversions'" setting.
  15. Click Attribution model. This setting lets you choose how to assign credit for each conversion.
    • If you would like to use a Google Ads attribution model, select Use Google Ads attribution and select a model from the dropdown. Learn more about each option and how this setting works in About attribution models.
    • If you would like to use your own attribution model and import fractional credit for each GCLID, select Use external attribution.

      Note: You cannot switch between external attribution and Google Ads attribution once the action has been created.

  16. Click Create and continue.
  17. Click Done.

Important: After creating a new conversion action, wait 4-6 hours before uploading conversions for that conversion action.  If you upload conversions during the first 4-6 hours, it might take 2 days for those conversions to appear on your reports.

How to upload conversions for multiple accounts from a single file

To do this, all of the relevant accounts need to be linked from a shared manager (MCC) account. This manager account is where you will upload your files. Google Ads then imports any conversions that originated from its linked accounts.

Keep in mind: If you upload a conversion for an account that isn't linked from your manager account, you will get a "not authorized to upload" error.

  • If you use cross-account conversion tracking: You'll need to create your import conversion actions at the manager account level and follow instructions to make sure all managed accounts use the manager as the "conversion account."
  • If you don't use cross-account conversion tracking: You'll need to create your import conversion actions in each individual account. Keep in mind: if you're tracking the same conversion (for example, "lead qualified") across multiple accounts, it's critical that you use the exact same spelling and capitalization for each conversion name in each of your accounts.
  • If you haven't used Google Ads conversion tracking before and all of the accounts under your manager account belong to the same business: You'll want to use cross-account conversion tracking. It can help simplify tracking your conversions and your Attribution reports.

Part 2: Enable your website and lead tracking system

In Part 2, the three steps you'll need to complete will be covered: 

  1. Update every lead submission form page so the GCLID will be passed to your lead management system.
  2. Add a script (see our suggested script below) to all of your web pages to capture and store the GCLID.
  3. Store the GCLID, along with the prospect's information, in your lead management system. 
     

Keep in mind: Be sure to complete part 1 (above)—create one or more conversion actions—before starting this step. Otherwise, you won't be able to import your early conversions.

  1. You will need to modify each form submission page to add a hidden form field for the GCLID.  This is how the GCLID will be passed to your backend system.
    Here's an example form with a hidden field for the GCLID.  If you are able to modify your form code directly, you will simply insert the highlighted <input> tag in between your <form> tags.  In some cases, your lead management systems administrator may need to generate this form code for you.

 

   <form action="" name="myForm"> 		
         Name: <input type="text" name="name"> 		
         <input type="hidden" id="gclid_field" name="gclid_field" value=""> 	 	
         <input type="submit" value="Submit Form" name="btnSubmit"> 	
   </form>
       
  1. Update the code on each of your web pages to capture and store the GCLID (via cookie or local storage). You are free to write your own script, or use this suggested script below.  If you use the script below, be sure to update the "var gclidFormFields" line to include the list of all the field IDs you created in the previous step:

    <script>

    function getParam(p) {
      var match = RegExp('[?&]' + p + '=([^&]*)').exec(window.location.search);
      return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
    }

    function getExpiryRecord(value) {
      var expiryPeriod = 90 * 24 * 60 * 60 * 1000; // 90 day expiry in milliseconds

      var expiryDate = new Date().getTime() + expiryPeriod;
      return {
        value: value,
        expiryDate: expiryDate
      };
    }

    function addGclid() {
      var gclidParam = getParam('gclid');
      var gclidFormFields = ['gclid_field', 'foobar']; // all possible gclid form field ids here
      var gclidRecord = null;
      var currGclidFormField;

      var gclsrcParam = getParam('gclsrc');
      var isGclsrcValid = !gclsrcParam || gclsrcParam.indexOf('aw') !== -1;

      gclidFormFields.forEach(function (field) {
        if (document.getElementById(field)) {
          currGclidFormField = document.getElementById(field);
        }
      });

      if (gclidParam && isGclsrcValid) {
        gclidRecord = getExpiryRecord(gclidParam);
        localStorage.setItem('gclid', JSON.stringify(gclidRecord));
      }

      var gclid = gclidRecord || JSON.parse(localStorage.getItem('gclid'));
      var isGclidValid = gclid && new Date().getTime() < gclid.expiryDate;

      if (currGclidFormField && isGclidValid) {
        currGclidFormField.value = gclid.value;
      }
    }

    window.addEventListener('load', addGclid);

     </script>

Adding the code:

  • In order to avoid missing some conversions, it’s strongly recommended that you add this script to every web page on your site (not just your landing pages). For example, add this script to your webpage template, so that all your new pages will automatically include it. Or you can add this script in a global element like the page footer.

  • When you add the script, it's a good idea to insert it on every web page, immediately before the closing </body> tag.

  1. Modify your backend customer data management system so that when it receives the GCLID value from the form field, it can store the GCLID along with the prospect's information. For example, if you're using a lead management system, have your IT team add a custom field to your lead object so the GCLID can be stored and retrieved easily and reliably. Your IT team can check the integration guide for the specific system you use.

Tip: Use Google Tag Manager to collect the GCLID

If you have a Google Tag Manager account, and use the same field name across all forms, you can use it to implement the above script by following these steps:

  1. Log into your Google Tag Manager account at http://www.google.com/tagmanager.
  2. Under "Accounts," click the name of the account with the container you use for your Google Ads tags.
  3. Under "Containers," click the name of the container you want to use.
  4. Click the New button, then select Tag from the drop-down menu.
  5. Enter a name in the "Tag Name" field (you might want to use something like "Google Ads Click ID Collection for Conversion Import").
  6. Under "Tag Type," select Custom HTML Tag from the drop-down menu.
  7. Copy the JavaScript from step 2 above and paste it into the "HTML" field.
  8. Under "Firing Rules," click the +Add button. Check the box next to "All pages" and click Save.
  9. Click Save.
  10. Click the Create Version button.
  11. Click the Publish button.

Import conversions into Google Ads

You’ve now set up your Google Ads account, website, and lead tracking system. To finish tracking offline conversions, you can now follow the instructions to import conversions into Google Ads.

Was this helpful?
How can we improve it?