HOW TO: Import Offline Conversions Into AdWords

Recently, Google AdWords introduced the ability to import offline sales data. If you get a lot of phone sales, you’ll want to do this. Google says:

Sometimes, a click on an AdWords ad does not lead directly to an online sale, but instead starts a customer down a path that ultimately leads to a sale in the offline world, such as at your office or over the phone. By importing offline conversions, you can measure what happens in the offline world after a click on one of your ads.

I think we all agree. Let’s do this. Here’s how:

Step #1 – Enable Auto Tagging

Go to Google AdWords → My Account → Preferences and turn on Auto Tagging. This will allow Google to add a suffix parameter with the GCLID to each URL.

Step #2 – Capture The GCLID

Whenever someone clicks on your ad and comes to your website, you will need to grab the GCLID from the URL parameter and store it in the session or cookie. Sample JavaScript code to store the GCLID in a cookie called ‘gclid’:

gclid

Step #3 – Store GCLID With Lead Data

When they submit a contact form, you will want to store the GCLID in your database alongside the rest of the customers information.

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

[code highlight=”3″]<form action=”” name=”myForm”>
Name: <input type=”text” name=”name”>
<input type=”hidden” id=”gclid” name=”gclid” value=””>
<input type=”submit” value=”Submit Form” name=”btnSubmit”>
</form>
[/code]

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.

[code lang=”JavaScript”]
<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’).value =
readCookie(‘gclid’);
}
</script>
[/code]

Step #4 – Offline Conversions

Go to Google AdWords → Tools and Analysis → Conversions and click ‘+Conversion’ and add a new conversion. When adding the new conversion, select ‘Import’ as the source.

Conversion Tracking

Step #5 – Import Conversions

Now that you set up a Conversion in AdWords, you’ll want to go back to Tools and Analysis → Conversions. Now click on ‘Upload’ and you will get the upload page.

Conversion Tracking

Before uploading, make sure you format the data according to the template files provided by Google. Here is a sample of how the data should look:

csvtemplate

Header Notes: Make sure to edit the time zone in the header. I entered -5000 for New York in my sample. Column Notes:

  • Action – should always say the word ‘add’
  • Google Click Id – should have the GCLID associated with that conversion
  • Conversion Name – should match the exact value from step #3
  • Conversion Value – dollar amount, no commas or currency symbols
  • Conversion Time – date and time of the transaction

You should be all set.

Let us know how it works for you in the comments.

Menachem Ani ()

Online Advertising and eCommerce Expert with over a decade of success developing high-impact marketing strategies for online retailers and lead-generation clients.

Comments (2)

  1. josh:

    Hi Menachem,

    i have a wordpress site and use contact form 7 to capture leads. I have adwords conversion tracking set up on all thank you pages(each form on the site has a separate thank you page). as a novice wordpress user with limited code experience, I’m at a loss as to where the code should be implemented and what part of the code should match my website

  2. Roman:

    Use of your script code to store the ID in the cookie produces the following error:

    Error: SyntaxError: unterminated string literal
    Source Code:
    Date;c.setTime(c.getTime()+864E5*b);b=”;

Comments are closed.