Importing Offline Conversions in Google Ads

In these modern times, Google Ads has become one of the most important and effective marketing channels for companies of any shape and size. Along with that, the ability to measure and optimize for conversions is one of its most powerful capabilities that this marketing platform offers. However, up until now, the conversion tracking tools have only worked for basic online conversions, such as lead submissions or e-commerce transactions.

 

With that in mind, Google released the conversion import feature, which allows you to track your offline conversions, and that is precisely the topic of today’s blog post.

 

Offline conversion upload is great for any marketer with a complex and multi-layer sales cycle, especially since the offline conversion data can be incorporated into your existing AdWords conversion data. That would also mean that you can leverage other features such as Automated Rules, flexible bid strategies, which automatically sets bids to help you get as many conversions or as much value as possible while reaching your goals.


What Is Offline Conversion Tracking?

 

Assuming that you’re an advertiser focused on generating leads, the ads that you run usually don’t directly lead to online sales. More often than not, the ad drives the customer down a path that ultimately leads to a sale in the offline world, for example at your store or through the phone.

 

With offline conversion tracking feature in Google Ads, you will be able to measure any desirable offline action, that takes place after a customer submitted a lead form (or called your business), and then import them in the Google Ads.

 

With these features, you will be able to get a better sense of keywords and targeting approaches, such as geography or time of day, which are driving the most cost-effective sales. This data is very valuable because it will help you to optimize and fuel your Smart Bidding campaigns.

 

But most important of all, tracking your offline conversion will allow you to better understand the ROI of your Google Ads marketing efforts and to further optimize for outcomes that matter the most to your business.

 

Benefits of using Google Offline Conversion Tracking

 

As we are sure you probably realized, there are a lot of benefits to using importing and tracking offline conversions. This is highlighted by the fact that 58% of medium-sized businesses say that improving lead quality is a critical aspect of lead generation, according to eMarketer.

 

But still, we have listed out the 5 main benefits of using Google Offline Conversion Tracking

 

  1.   By importing offline conversions, Google’s smart bidding algorithms can optimize the conversions that are closer to real business outcomes
  1.   The data produced will help you bridge the gap between Google Ads spend and conversion data that were not available before.
  1.   It will give you a more detailed overview of successful keywords that result in sales. This information will help to better understand how to optimize campaigns and performances.
  1.   It allows you to understand the quality of leads generated by a specific campaign and, consequently, improve ROAS by increasing their bids on the keywords that generate more revenue.
  1.   It will help you evaluate your targeting criteria. For example, you can measure and track offline sales based on the time of day it occurs or the geography. This will help you better distinguish the factors that produce the most cost-effective conversions.

How Offline Conversion Data Works

 

Here’s how offline conversion tracking works when measuring conversions: When a potential customer clicks on the ad, Google generates a unique ID, called a Google Click ID or “GCLID”, for each click.

 

Firstly, you would have to implement a snippet of code on your website to capture the Google Click IDs. Then, when the potential customer converts through your website, it will include the ID along with the other information in the form.

 

At this point, that submitted information, (for example, email address and name), is added and stored in a CRM system, or spreadsheet, along with the Google Click ID. After the data is collected and sorted, your sales team will be able to complete the sale or deal offline. Once complete, you upload that data to Google Ads through a spreadsheet or a file transfer from your CRM.

 

Top 3 ways of importing offline conversions

 

These are the top 3 ways you can automate the process without using the previously mentioned software and without the need to manually add the data every single day.

 

  1. Google Sheet with Script and Automatic Schedule – One of the most effective ways of importing conversions, that will let you see how your online ads affect offline sales and other valuable actions.

  2. Zapier – Using Zapier offline conversion import for Google Ads will give you the ability to automate your offline conversion tracking information from (CRM) system to your Google Ads account. One of the benefits of using Zapier that we want to highlight is that it will give you a simplified process to make the connection between your CRM and Google Ads. It also will track conversion actions and values in real-time, which is a huge plus.

  3. Google AdsAPI – The last useful way that we have listed out is importing offline conversions through another service provided by Google, the Google Ads API. Also with this tool, you will be able to set up a conversion tracker and measure the exact conversions that you want.

Google Sheets

 

As we previously mentioned, one of the main ways of importing offline conversions is through Google Sheets. Simply follow this 5 step process to get anything you want out of conversions:

  • Create a new Google Sheet
  • Link it to Google Ads Conversion import
  • Create a script within the sheet that connects whatever database or CRM tool you are using
  • Let the script run automatically

Zapier

 

Another way of importing your offline conversions is by using “the glue that connects thousands of web apps”, Zapier. To do so, you would need to follow these steps:

 

Step 1 – Select Where You Track Conversions

 

For this example, we’re using Salesforce as the trigger app but you will be able to use this same workflow for most other supported CRMs. Select Salesforce and as the trigger event, use “Update Field on Record”. The “Salesforce Object” box will ask you to select the object type you are using to track your leads and conversions. Objects in Salesforce could be things such as Contact, Lead, etc.

 

The ”Field” option should be set to the field on the selected object where the conversion status is updated (e.g. a “stage” field in the lead object). Use the last box to type the name of the contact or lead stage that indicates the conversion exactly as it appears in your CRM. To confirm the integration is actually working, press “Test & Review.” If everything is working, you’ll be shown the most recent records in your CRM for that field.

 

Step 2 – Create a Filter

 

Next, we’ll ensure the Zap only exports conversions that came from Google Ads. To do this, you can search for and select the “Filter by Zapier” app. This filter will check if the record has a Google Click ID. In the dropdown, search for and select the field where you store the GCLID in your CRM. Then select the “Exists” option.

 

Once you press “Continue”, Zapier could say that the Zap would not continue. This is likely because the most recent record in your CRM did not contain a GCLID. Press Continue and proceed to the third step. 

 

Step 3 – Add a Delay (We recommend this)

 

Recommended: If the conversion event that you want to track occurs within 24 hours of the time the ad has been clicked on, then you can proceed to complete this step.

 

  • Search for and select “Delay by Zapier”
  • Select “Delay For” in the second drop-down box.

In the first box, type “24” through which you will provide the time value. In the second box, click the dropdown and select “Hours”. When you’re done press continue. On the next screen, press “Test & Continue” to move to step 4.

 

Step 4 – Set up the Offline Conversion 

 

In the “Use Google Ads as…” field, select the Google Ads Account you wish to import conversion events into. In the “Google Click ID (GCLID)” field we recommend that you insert the field from within your CRM (which was step 1) that contains the GCLID. In the “Conversion Action” field, select the action. Many CRMs have a field such as “Last Modified Date” which you can use, so the “Timestamp” field tells Google exactly that. This will automatically insert the time your Zap runs. Then, you can press  “Continue” and proceed to Step 5.

 

Step 5 – Test the Zap 

 

You are done setting up the Zap. Press “Test & Continue” to ensure everything is set up correctly. Once the test is completed, you will probably see one of the two options: Success when your sample data had a GCLID:

 

  • A green banner and a notification that a test event was sent. Move to step 6 Success when your sample data did not have a GCLID.

  • A red banner saying that the Google Click ID is missing. This is because the sample didn’t contain a GCLID. However, we still would consider this a success since we shouldn’t upload conversions without the GCLID.

Select the “Skip Test” button in the top right. 

 

Step 6 – Turn on the Zap! 

 

Unless you turn the Zap on, the. This is a very important step Task History Zapier will not start importing your conversions. Needless to say, without turning the Zap on, nothing will happen! 

 

You’re done! 

 

With that, you’ve set up a Zap that connects your CRM to Google Ads Offline Conversion Tracking.

Google Ads API

 

By uploading or linking to a file through the Google Ads interface, or by transmitting the data through the Google Ads API, you will be able to import your data into Google Ads. Before beginning the process of importing your offline conversions, you need to make sure that you follow all of the instructions on how to set up offline conversion tracking.

 

This part of the blog post is dedicated to explaining how to use the Google Ads API Conversion Import Tool to track your offline conversions. It is a more technical solution you should implement with the help of a developer. 

 

We would generally only recommend using this solution if you want to monitor your uploaded conversions daily and have a concern about data security when using the other two options above. 

 

You store a click id that Google appends to your destination URLs then use it to upload the clicks once they convert offline. There are three steps you need to follow to get started using the tool:

 

  • Create a new conversion type in Google Ads for the upload.

  • Collect the click ids and store them in your database.

  • Upload each click that converts using the Google Ads API.

Creating a New Conversion Type in AdWords

 Before starting the import on your conversions, you would need to create a new conversion type with a source of Import. You can do so by using either the “Conversions” screen in your AdWords account or the AdWords API Conversion Tracker service:

$conversionName = "Phone Call";


$conversionTrackerService = $user->GetService("ConversionTrackerService", API_VERSION);

 
$uploadConversion = new UploadConversion();

$uploadConversion->name = $conversionName;

$uploadConversion->category = "LEAD";

$uploadConversion->ctcLookbackWindow = 90;

$uploadConversion->viewthroughLookbackWindow = 30;

 
$operations = array(new ConversionTrackerOperation($uploadConversion, "ADD"));

$result = $conversionTrackerService->mutate($operations);

 The script creates a new conversion with the following parameters:

 

  • name: This is the name of the new conversion, which must be unique within the account.
  • category: The conversion category; chosen from DEFAULT, PAGE_VIEW, PURCHASE, SIGNUP, LEAD, or REMARKETING.
  • ctcLookbackWindow: The maximum amount of days after a click that a conversion can be registered. The must be an integer between 7 and 90.
  • viewthroughLookbackWindow: The maximum amount of days after a click that a view-through conversion can be registered. The must be an integer between 1 and 30.

You will be able to see a new conversion in your AdWords account, after running this code:

 Once you’ve set up the conversion, you don’t have to run the code again.

Collecting & Storing the Click Ids on Your Website


You link your offline conversions to AdWords clicks using Google Click ID. This is the same ID that Google has used in Analytics for a while now, but you can also use it in your tracking systems. PLEASE NOTE: that if your Google Analytics account isn’t already linked to your AdWords account, then you’ll need to enable
URL auto-tagging in AdWords.

 

Once you have enabled it, Google will send you a URL parameter, called GCLID, that you need to extract and store. How to connect the parameter with an offline conversion is often somewhat challenging, so we will just store it in a cookie then insert the cookie into a form. You can store the cookie using some JavaScript on your landing page:

<script type="text/javascript"> 

    function saveClickId(cookieName) { 

        var queryString = document.location.search; 

        var gclidStart = queryString.indexOf("gclid="); 

        if (gclidStart > -1) { 

            gclidStart += 6; 

            var gclidEnd = queryString.indexOf("&amp;", gclidStart); 

            if (gclidEnd > -1) { 

                var gclid = queryString.substring(gclidStart, gclidEnd); 

            } else { 

                var gclid = queryString.substring(gclidStart); 

            } 

            var gclidExpireDate = new Date(); 

            gclidExpireDate.setDate(gclidExpireDate.getDate() + 90); 

            document.cookie = cookieName + "=" + gclid + 

            "; expires=" + gclidExpireDate.toUTCString(); 

        } 

    } 

 

    try { 

        saveClickId("gclid"); 

    } catch (e) { 

        // error 

    } 

</script>

This code’s quite basic, but it should capture the click id in a cookie called “gclid” that you can use in a PHP form:

<form action="<?php print $_SERVER["PHP_SELF"]; ?>" method="POST">

    <input type="text" name="fullname"/>

    <input type="hidden" name="gclid" value="<?php print $_COOKIE["gclid"]; ?>"/>

    <input type="submit" value="Submit Conversion"/>

</form>


Uploading the Conversions to AdWords

However you have stored your click ids, for the next step, let’s assume you have it in an associative array:

$conversions = array(

    array(

        "gclid" => "CMbBkZi12roCFZlq1tAdwaXYADD",

        "date" => 1384127111,

        "value" => 5.12

    ),

    array(

        "gclid" => "SJFKS23a12roCFZMdtAodeaaYAaQ",

        "date" => 1384127292,

        "value" => 10

    )

);

This represents each conversion using an associative array with the following three entries:

 

  • gclid: The Google click id extracted from the landing page.
  • date: The time of the conversion event.
  • value: The revenue associated with the conversion. You can skip this if you don’t want to assign a value to the conversion.

You can import every conversion by sending an OfflineConversionFeed to the OfflineConversionFeedService:

$conversionName = "Phone Call";

$offlineConversionService = $user->GetService("OfflineConversionFeedService", API_VERSION);

 

$operations = array();

foreach ($conversions as $conversion) {

    $gclid = $conversion["gclid"];

    $convDate = date("Ymd His", $conversion["date"]);

    $convValue = isset($conversion["value"]) ? $conversion["value"] : 0;

    $offlineConversion = new OfflineConversionFeed(

            $gclid, $conversionName, $convDate, $convValue

    );

    $operations[] = new OfflineConversionFeedOperation($offlineConversion, "ADD");

}

 

$result = $offlineConversionService->mutate($operations);

This code creates an OfflineConversionFeed for all of your offline conversions and uploads them using the mutate() function of the OfflineConversionFeedService. It will take a few hours for those conversions to turn up in your account, but you should see the conversion appearing in reports:

 

Here’s a full script including the boilerplate AdWords API authentication code, which you can find out about in my OAuth Playground Tutorial:


<?php

set_include_path(get_include_path() . PATH_SEPARATOR .

        dirname(__FILE__) . "/adwords_api_php_4.6.1/src");

require_once("Google/Api/Ads/AdWords/Lib/AdWordsUser.php");

 

define("OAUTH_CLIENT_ID", "[YOUR CLIENT ID]"); 

define("OAUTH_CLIENT_SECRET", "[YOUR CLIENT SECRET]"); 

define("OAUTH_ACCESS_TOKEN", "[YOUR ACCESS TOKEN]"); 

define("OAUTH_REFRESH_TOKEN", "[YOUR REFRESH TOKEN]"); 

define("CUSTOMER_ACCOUNT_ID", "[YOUR ACCOUNT ID]"); 

define("DEVELOPER_TOKEN", "[YOUR DEVELOPER TOKEN]"); 

define("API_VERSION", "v201309");

$conversionName = "[YOUR_CONVERSION_NAME]";

 

$user = new AdWordsUser();

$user->SetDeveloperToken(DEVELOPER_TOKEN);

$user->SetClientCustomerId(CUSTOMER_ACCOUNT_ID);

 

$user->SetOAuth2Info(array(

    "client_id" => OAUTH_CLIENT_ID,

    "client_secret" => OAUTH_CLIENT_SECRET,

    "access_token" => OAUTH_ACCESS_TOKEN,

    "refresh_token" => OAUTH_REFRESH_TOKEN

));

 

$handler = $user->GetOAuth2Handler();

$oauth2Info = $handler->RefreshAccessToken($user->GetOAuth2Info());

$user->SetOAuth2Info($oauth2Info);

 

/** 

 * Creating a new conversion (only run once)

*/

$conversionTrackerService = $user->GetService("ConversionTrackerService", API_VERSION);

 

$uploadConversion = new UploadConversion();

$uploadConversion->name = $conversionName;

$uploadConversion->category = "LEAD";

$uploadConversion->viewthroughLookbackWindow = 30;

$uploadConversion->ctcLookbackWindow = 90;

 

$operations = array(new ConversionTrackerOperation($uploadConversion, "ADD"));

$result = $conversionTrackerService->mutate($operations);

 

/** 

 * Your list of clicks and conversions from your database

 */

$conversions = array(

    array(

        "gclid" => "CMbBkZi12roCFZlq1tAdwaXYADD",

        "date" => 1384127111,

        "value" => 5.12

    ),

    array(

        "gclid" => "SJFKS23a12roCFZMdtAodeaaYAaQ",

        "date" => 1384127292,

        "value" => 10

    )

);

 

/**

 * Uploading the offline conversions using the OfflineConversionFeedService

 * Run this regularly for clicks that are at least six hours old 

 * (eg run at 6 AM local time for the previous day's conversions)

 */

$offlineConversionService = $user->GetService("OfflineConversionFeedService", API_VERSION);

 

$operations = array();

foreach ($conversions as $conversion) {

    $gclid = $conversion["gclid"];

    $convDate = date("Ymd His", $conversion["date"]);

    $convValue = isset($conversion["value"]) ? $conversion["value"] : 0;

    $offlineConversion = new OfflineConversionFeed(

            $gclid, $conversionName, $convDate, $convValue

    );

    $operations[] = new OfflineConversionFeedOperation($offlineConversion, "ADD");

}

 

$result = $offlineConversionService->mutate($operations);


Conclusion

 

While some businesses still depend on customers visiting their physical locations, more than half of offline transactions are influenced by digital interaction. That’s why businesses need to make improvements in tracking offline sales. 

 

Google Offline Conversion Tracking is an important tool that these companies can utilize to get information about the quality and value of the leads the ads are driving and at the same time understanding the return of ad spend (or ROAS) of their campaigns. Most importantly, it allows companies to optimize for the outcome that matters most to the business.

 

Because of this useful tool, advertisers can finally close the gap between online to offline conversions. Those businesses who track offline sales and offline events have a more detailed overview of successful keywords that result in conversions and increase their bids on those keywords to generate more revenue.

 

Did you find this blog post useful? Leave a comment below!

 

And we’ll see you at the next one.

Categories: Google Ads

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published.