Q: How do I fire a tracking pixel in Adwords? — Perplexed in Peru

A: Dear Peru; Way back in the late 1990s, there was indeed a pixel. A clear image was placed on a web page. It was a 1X1 image, the size of a single pixel, with a unique name (e.g., pixel-feb-01.gif). Because it was clear, the visitor couldn’t see it. You then looked at the hit counter (sorry, web analytics hadn’t been invented yet) and saw that you had 300 hits on good ol’ pixel-feb-01.gif. Yep, they talked about hits. Funny, no? Conversions hadn’t yet been invented either. The interweb still ran through steam pipes.

Nobody uses pixel images anymore because that was too primitive. Yet I still hear people talk about pixels. Whatever.

What you really want is Javascript. The following works if you want to track an event where a click doesn’t open a new page:

  1. Look at your web page and find the button that you want to track, such as “Buy Now!”.
  2. Open the HTML for your page, such as http://whatever.com/stuff.html
  3. Find the following text string <a href=”http://whatever.com/stuff.html”>Buy!</a> (Tip: use search to find the text in the button, e.g., “Buy!”).
  4. Replace it with this new string: <a href=”http://whatever.com/stuff.html” onClick=”ga(‘send’, ‘event’, { eventCategory: ‘sale’, eventAction: ‘account’, eventValue: 10});”>Buy!</a>
  5. Note: In the string, eventCategory is set to “sale”. You can change this to “lead”, “registration”, “signup”, whatever.
  6. Note: In the string, eventValue is set to “10”, which is $10. You can set this to zero, but it’s best to give it a value, such as the average value of a sale. If you want to track the actual value of each sale, contact your transactions tool’s support and ask them for the code.
  7. Save the file and upload to your server.
  8. When someone clicks on your button, it’ll show up as a conversion in Google Adwords. Cool, no?

What It Does: A bit of Javascript simulates a page event in Google Analytics. I could explain this, but it takes too long and you don’t really care about the details.

Another Note: In most cases, you’ll have to ask your web developer to make these changes for  you (it’s usually that 12-year girl in the computer department). Most sites aren’t simple HTML anymore, so she’ll have to find the button and change it for you.