Search
Clear search
Close search
Google apps
Main menu
true

Set up offline conversion tracking

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

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 AdWords and Salesforce accounts and track when your AdWords campaigns lead to milestones in your sales funnel.

Before you start

To import offline conversions for your business, you'll want to make sure that 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 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's less than 90 days. Any conversion uploaded more than 90 days after the last click associated with it occurred will not be imported by AdWords, and will therefore not show up in your conversion statistics.

Instructions

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

Step 1: Create one or more import conversion actions

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

Here's how to create a new offline conversion action:
  1. Sign in to your AdWords account.
  2. Click the Tools tab and select Conversions from the drop-down menu.
  3. Click on the + Conversion button.
  4. You'll now see options for the different kinds of conversion sources that you can track. Select Import.
  5. Enter a name for the conversion action that 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.) Click Done.
  6. Click Value. Select how to track the value of each conversion:
    • Each time that it happens, the conversion action has the same value. Enter the amount that each conversion is worth to your business.
    • The value of this conversion action may vary. Use this option if, for example, you’re tracking purchases of products with different prices.
    • Don't assign a value.
    Click Done.
  7. Click Count. Select how to count your 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 Done.
  8. Click Conversion window. Select how long after an ad click you want to track conversions for this conversion action. The window can be 1–90 days. Click Done.
  9. Click Category. Select the category that best describes your conversion. You can use this category to segment your conversion reports. You can always change it later. Click Done.
  10. (Advanced) Click Include in "Conversions". Untick this setting – selected by default – if you don't want to include data for this conversion action in your “Conversions” reporting column. If you untick this setting, data will still be included in the “All conversions” column.

    You might want to use this setting if you use an automated bid strategy to optimise 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. Click Done.
  11. Click Attribution model. This setting lets you choose how to assign credit for each conversion; to the last click that a customer made before a conversion, the first click or a combination of clicks. Find out more about each option and how this setting works in About attribution models.
  12. Click Done.
  13. Click on Save and continue.
  14. You'll now see a confirmation with a link to the help centre. 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 two 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'll upload your files. We'll then import any conversions that originated from its accounts.

Bear in mind: If you upload a conversion for an account that isn't linked from your manager account, you will get a "not authorised 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 that 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. Bear in mind: if you're tracking the same conversion (for example, "lead qualified") across multiple accounts, then it's critical that you use the exact same spelling and capitalisation for each conversion name in each of your accounts.
  • If you haven't used AdWords 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 to simplify tracking your conversions and Attribution reports.

Step 2: Enable your website and lead tracking system

Bear in mind: Make sure that you complete step 1 (Create one or more conversion actions) before starting this step. Otherwise, you won't be able to import your early conversions. Also, this code sometimes requires small changes, depending on your website's current design. Talk to your webmaster or IT team when completing this step.

  1. Update the code on each of your web pages to capture and store the GCLID in a cookie.

    Here's sample JavaScript code that you can use on each web page to store the GCLID in a cookie named "gclid".

    <script type="text/javascript">
    function setCookie(name, value, days){
        var date = new Date();
        date.setTime(date.getTime() + (days*24*60*60*1000)); 
        var expires = "; expires=" + date.toGMTString();
        document.cookie = name + "=" + value + expires + ";path=/";
    }
    function getParam(p){
        var match = RegExp('[?&]' + p + '=([^&]*)').exec(window.location.search);
        return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
    }
    var gclid = getParam('gclid');
    if(gclid){
        var gclsrc = getParam('gclsrc');
        if(!gclsrc || gclsrc.indexOf('aw') !== -1){
    	    setCookie('gclid', gclid, 90);
    	}
    }
    </script> 

    It's a good idea to insert this code at the bottom of every web page, immediately before the closing </body> tag. This way, you don't have to add it every time you create new ads with new landing pages, or worry about losing GCLIDs if you change landing pages for existing ads. Even better, consider adding this code to your web page template so that all your new pages will automatically have the code and be able to capture GCLIDs.

  2. Modify your site's prospect lead information submission page – usually, a lead submission form – to read the GCLID from the cookie and pass it along to your lead management system, along with the lead's contact information.

    You can retrieve the GCLID value via your choice of client or server-side languages. Once retrieved, it's a good idea to pass the GCLID through your lead submission form as a hidden field element.

    Here's an example form with a hidden field for collecting the GCLID. You should insert the highlighted <input> tag in between your <form> tags:

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

    Here's example JavaScript code you can use to retrieve the GCLID value from the cookie and update the value of the hidden form element. It's important that you insert this code after the GCLID collection code that we provided to you in the previous step (Step 2.1) and before the closing </body> tag.

      <script> 
      function readCookie(name) { 
      var n = name + "="; 
      var cookie = document.cookie.split(';'); 
      for(var i=0;i < cookie.length;i++) {      
          var c = cookie[i];      
          while (c.charAt(0)==' '){c = c.substring(1,c.length);}      
          if (c.indexOf(n) == 0){return c.substring(n.length,c.length);} 
      } 
      return null; 
      } 
    
      window.onload = function() {      
          document.getElementById('gclid_field').value = 
      readCookie('gclid'); 
      } 
      </script>
    

    This example assumes that you have a hidden field called 'gclid_field' in your form. If your field has a different name (for instance, if you have to use the name that your CRM system created for you), then simply replace 'gclid_field' with that name.

  3. Modify your backend customer data management system so that it can store the GCLID along with the prospect's information. For example, if you're using a lead management system, add a custom field to your lead object so that this ID can be stored and retrieved easily and reliably. Check the help centre of the system you use for specific integration guides.

Tip: Use Google Tag Manager to collect the GCLID

If you have a Google Tag Manager account, you can use it to implement your GCLID collection JavaScript by following these steps:

  1. Log in to your Google Tag Manager account at http://www.google.com/tagmanager.
  2. Under Accounts, click the name of the account with the container that you use for your AdWords tags.
  3. Under Containers, click the name of the container that 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 "AdWords 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.1 above and paste it into the "HTML" field.
  8. Under "Firing Rules", click the +Add button. Select the box next to "All pages" and click Save.
  9. Click on Save.
  10. Click the Create Version button.
  11. Click on the Publish button.

Import conversions into AdWords

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

Was this article helpful?
How can we improve it?
Reach more customers with an online ad

With AdWords, you can run ads on Google to stand out on local searches. Only pay when your ad is clicked on. [Learn more]

Sign Up for AdWords