The Nitty Gritty: Email Tracking

Open mailbox and keyboardFollowing a comment left on Keith’s post from last week  regarding email analytics I received a number of questions (public and private) regarding the simple use of the tools already available to us to track email opens (and forwards, number of views, etc.) this seemed like an ideal time to introduce a new (and hopefully semi-regular feature) on the nitty-gritty of using technology to your business advantage.

You may be asking yourself, “Why should I care?  I’m a flack, erm PR Pro – let the techies handle that stuff (or we don’t care about analytics on our emails).”

Perhaps true.  But if you’re in a small agency you may not have techs around to really handle this or they never thought to apply analytics to emails because they simply don’t know our business and don’t know what questions to ask.

Even if you don’t know all the ins and outs of using your tools, you should know what’s available to you (even if you need help putting it to use).  After all – you know a saw is used to cut things – whether to use a hacksaw or chainsaw for a particular application may be beyond your skill level but you know such a tool exists even if you need guidance using it when the time comes.  It’s all part of owning your tech rather than having it own you – as much of a technophile as I am even I don’t like to be controlled by the tech I use on a daily basis.

With limited exception there are numerous workarounds or backup systems that should be  in place for any system – even a printer that’s decided to stop working can throw an entire schedule off, and if it’s on launch day all the “better.” Knowing what’s gone wrong and why, or what you’d like to do and where that data (or platform) might be and what you can possibly use to get at it are critical to knowing what’s next, what can be done with what’s already there and what to ask for.

For those of you that are more technically inclined it’s not all that much of a stretch and the quick bullets are below (for those of you that are not, see below the bullets for more detailed information):

1.  Make and upload a transparent or white 1×1 pixel image to your server/host.

2.  Insert said image as an inline graphic (not an attachment) into your email with (what I’ll call a tracking code – e.g. “?xyz” after the .gif)

3.  Send message.

4.  Watch log files disregarding your own IP address.

Now for the detailed instructions.

A few notes and pitfalls: This won’t work all the time (I know, kind of sucks).  For example, MS Outlook has a security feature which prevents images from displaying if the sender is unknown to the receiver.  In that situation the receiver will see:

Click on images to expand to readable size.

If the receiver knows you (and has accepted your messages as safe) they’ll see (i.e. it will work):

GMail has a similar feature.  This is why it’s important to not name your file “tracker.gif” since that’ll be a giveaway.  “spacer.gif” or similar, particularly when integrated with a signature file which has the various social media/networking icons (LinkedIn, Facebook, etc.) in it should work.  It also appears Blackberries operate a bit differently and an iPhone which hasn’t downloaded the graphics for a message yet will look wonky.  But it’s certainly better than just throwing out emails into the wild and having no idea if any of them landed properly.

Enough talk – down to the nitty gritty.

1.  Make and upload a transparent or white 1×1 pixel image to your server/host.

If you’ve got photoshop or similar, open an new file, make it 1 pixel horizontal by 1 pixel vertical, give it a transparent background, save it as a .gif file and you’re done. Or just grab this one (right click, select save file as (or its equivalent in your browser and save it somewhere you can find it – desktop is probably your best bet).

Call your favorite techie and ask them how to upload a graphic to your server (or get a server) by ftp and then figure out what the address is.  There are many guides online as well.

2.  Insert said image as an inline graphic (not an attachment) into your email with (what I’ll call) a tracking code – e.g. “?xyz” after the .gif

Ok, I’ll make this simple for now and give the GMail instructions – Outlook acts a bit wonky on this one and I don’t have access to Lotus or any Mac desktop email client.  If you can’t get it to work on your end – make a GMail account and enable it to send through your normal mail servers (I’m all about the workaround when it works and ensures the project isn’t a WOMBAT (Waste of Money, Brains, and Time).

So, in Gmail:  Go to your “Settings” (upper right), select labs, and enable “Inserting Images” and then save your settings (you may need to logout and relogin for it to show up when you compose a message).  After you enable this setting you’ll get a little icon in your GMail toolbar that looks like this:

When you get to the part of your email where you want to insert the spacer image, click the Insert Image icon, Select “Web Address (URL)” and provide the URL your spacer image, followed by whatever tracking code you’ve chosen to use (nota bene: I have no idea what the jargon for this code is, but adding a ? followed by text after the .gif in a graphics file keeps the file displaying properly but still shows up in your log files).

In the below screenshot we’re pretending it’s a pitch to a blog (which uses the abbreviatioin PRBC with today’s date).  Use whatever format you like, provided you can figure it out later (I would stay away from client names, etc.).

3.  Send message.

Finish message – hit send.

4.  Watch log files disregarding your own IP address.

First – figure out what your own IP address is.  This site works pretty well for that.  Next – ask your web host or techie where/how to get access to your log files (yes, there are programs that do specific analytics, etc. but that’s beyond the scope of this particular piece. However, if you use a mass mailer it should be simple enough to integrate unique codes for each recipient (even if it’s as simple as the line number of the spreadsheet they’re on) through a mailmerge, integrate those into a mailing, and see how many unique hits you get to your spacer/tracker image and do a little math – 5 unique opens for 100 recipients lets you know how often your email was ignored or not received).

Once you’ve got the log file opened (probably in notepad or wordpad) do a ‘find’ for your filename.  To cut the file down and just see the lines containing your spacer image use a program like Windows Grep to isolate those lines.

For those inexperienced at looking at log files – here’s a sample of the appropriate lines that came up while doing this post with notes (IP addresses have been partially, and in some cases completely, redacted and lines that don’t contain the ‘cogcomm’ address removed).

———- ACCESS.LOG.13.1

69.203.X.Y – – [29/Mar/2010:00:09:15 -0400] “GET /spa HTTP/1.1″ 404 2281 cogcomm.com “-” “Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.8 Safari/533.2” “-”

I’m the 69.203.X.Y Address.  In GMail’s Insert Image feature you’re presented with a preview of the image you’re integrating – or at least it tries to show it to you as you type.  The above line is GMail trying to get to the image as I’m typing in the address.  The few lines below is GMail’s progress as I finish typing in the file name.  Note the 404 — yes, the dreaded 404 file not found code.  Because there’s no ‘spa’ file but rather ‘spacer.gif’ the 404 popped up until the address had been completed.

Note the date, time and hours from Greenwich Mean are also shown.  If you’re so inclined you can also backtrack the full IP address to determine their host and basic geographical location through a site such as network-tools.com.

69.203.X.Y – – [29/Mar/2010:00:09:15 -0400] “GET /spac HTTP/1.1” 404 2282 cogcomm.com “-” “Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.8 Safari/533.2” “-”

69.203.X.Y – – [29/Mar/2010:00:09:16 -0400] “GET /spacer.gif HTTP/1.1″ 200 49 cogcomm.com “-” “Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.8 Safari/533.2” “-”

Note here – once the filename is completely typed in it changed from 404 to 200 (The “OK” notation).  We also get the OS I’m using and what browser.

69.203.X.Y – – [29/Mar/2010:00:09:17 -0400] “GET /spacer.gif? HTTP/1.1” 200 49 cogcomm.com “-” “Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.8 Safari/533.2” “-”

69.203.X.Y – – [29/Mar/2010:00:09:22 -0400] “GET /spacer.gif?prbc HTTP/1.1” 200 49 cogcomm.com “-” “Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.8 Safari/533.2” “-”

69.203.X.Y – – [29/Mar/2010:00:09:24 -0400] “GET /spacer.gif?prbc3 HTTP/1.1″ 200 49 cogcomm.com “-” “Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.8 Safari/533.2” “-”

69.203.X.Y – – [29/Mar/2010:00:09:26 -0400] “GET /spacer.gif?prbc0329 HTTP/1.1″ 200 49 cogcomm.com “-” “Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.8 Safari/533.2” “-”

Here’s where I’ve typed in the full address with the tracker code.  Note in the entry above this one I typoed the code “prbc3” rather than “prbc0329.” Once I got the address right, I sent it to myself at a dud address which I check using Outlook.

69.203.X.Y – – [29/Mar/2010:00:17:25 -0400] “GET /spacer.gif?prbc0329 HTTP/1.1” 200 49 cogcomm.com “-” “Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; MDDC; .NET CLR 3.5.30729; .NET CLR 3.0.30729)” “-”

Here’s where I received the message and opened it in Outlook (on a different account, same computer so same IP address).  Note there’s no Chrome or AppleWebKit reference (Chrome uses the WebKit framework, where Outlook is IE (Internet Explorer) compatible and apparently uses the .NET framework, etc.).

To make sure everything was working properly I recruited a twitterer who was online while finalizing this post to send them an embedded image.  Results below:  First my send from GMail, followed by their opening it from a completely different IP address (you’ll just have to believe me).

69.203.X.Y – – [29/Mar/2010:00:19:14 -0400] “GET /spacer.gif?remotetest HTTP/1.1” 200 49 cogcomm.com “-” “Mozilla/5.0 (etc.)

A.B.C.D – – [29/Mar/2010:00:22:05 -0400] “GET /spacer.gif?remotetest HTTP/1.1” 200 49 cogcomm.com “-” “Mozilla/5.0 (etc.)

And that’s pretty much it.  This might seem intimidating but I can assure you there’s nothing too complex here (lots of explanation though).  If it’s still too much – find a techie (paid or a nephew/niece) and they can set you up in about 10 minutes.

Happy Monday!

[reus id=”6”][recent posts]