Set up offline conversion imports using Google Click ID (GCLID)

Google Ads 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 Google Ads account and website for tracking offline conversions from imports using the GCLID (Google Click Identifier). After you’ve followed these instructions, you can then import your conversions into Google Ads. For information on other methodologies, read the following links:

Note: The instructions in this article explain how to use the GCLID (Google Click Identifier) to import offline conversions. If you have lead form user-provided data, read Set up enhanced conversions for leads.

Before you begin

To import offline conversions for your business using the GCLID (Google Click Identifier), 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 (Google Click Identifier) 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. The GCLID is case sensitive, so make sure that you’re uploading it correctly.
  • You have a click-to-conversion cycle that's 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 two parts to setting up imports for offline conversion imports: 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 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.

Here's how to create a new offline conversion action:
  1. In your Google Ads account, click the Goals icon Goals icon.
  2. Click the Conversions drop-down in the section menu.
  3. Click Summary.
  4. Click the plus button to create a new conversion action.
  5. You'll now see options for the different kinds of conversion sources that you can track. Click Import.
  6. Select Other data sources or CRMs if you'd like to integrate your CRM directly, or alternatively select Manual import using API or uploads.
  7. Click Continue.
  8. 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).
  9. Click the Category drop-down menu 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 Click-through conversion window. Select how long after an ad click you want to track conversions for this conversion action. For Search, Shopping and Display campaigns, the window can be 1 to 90 days.
  13. (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' and 'Conversion value' columns. If you untick this setting, data will still be included in the 'All conversions' column.
  14. Click Attribution model. This setting lets you choose how to assign credit for each conversion.
    • If you'd like to use a Google Ads attribution model, select Use Google Ads attribution and select a model from the drop-down. Learn more about each option and how this setting works in About attribution models.
    • If you'd like to use your own attribution model and import fractional credit for each GCLID, select Use external attribution.
    • Note: You can't switch between external attribution and Google Ads attribution after the action is created.
  15. Click Create and continue.
  16. 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. Google Ads then imports any conversions that originated from its linked accounts.

Bear in mind: If you upload a conversion for an account that isn't linked from your manager account, you'll 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 the instructions in Set up cross-account conversion tracking 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 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 to simplify tracking your conversions and 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 that the GCLID will be passed to your lead management system.
  2. Add a script (read 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.
Note: You should make sure that you're observing local regulations regarding cookie consent.

Bear in mind: Make sure that you 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'll 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're able to modify your form code directly, you'll 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're free to write your own script, or use this suggested script below. If you use the script below, make sure that you update the 'var gclidFormFields' line to include the list of all the field IDs that you created in the previous step.

    Note: You should make sure that you're observing local regulations regarding cookie consent.
    <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 web page 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 that 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.
  2. Under 'Accounts', click the name of the account with the container that you use for your Google Ads tags.
  3. Under 'Containers', click the name of the container that you want to use.
  4. Click New, 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. Tick the box next to 'All pages' and click Save.
  9. Click Save.
  10. Click Create Version.
  11. Click Publish.

Import conversions into Google Ads

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

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
15564431468931146621
true
Search Help Centre
true
true
true
true
true
73067
false
false
false