Your ebooks can track you

Jan 13, 2015 | The Publishing Industry

As you may know, I’m sometimes a web developer as well as being a writer/swordfighter. Being a dev means knowing all kinds of random stuff about what makes the Internet tick, and incidentally, it also lets me understand a few things about ebooks.

Ebooks can track the stuff you do when you read them.

No, really!

Okay, so there’s this format called ePub, right? Most of the big retailers either use this format or a variant of it, with the exception of Amazon (the Kindle format is based on Mobipocket). ePub is a free, open standard that uses XHTML and a subset of the most common CSS rules that web developers and designers know inside out.

Tech stuff. Long story short, ebook formatting is a LOT like a modified version of what we do to webpages. And the current iteration of the epub format has┬ásomething pretty awesome – no, not DRM (blech). It includes support for scripting, specifically Javascript. Web devs LOVE Javascript.

We can do all kinds of frankly silly things with Javascript. Effects, animations, interactivity – you ever wonder how interactive ebooks were going to happen? This is how. But JS can also do some incredible stuff that you’ll never see. At its heart, it’s still a dynamic language that can respond to user input and do things with it. Ebooks without scripting? They’re static, and only display information.

So one of Javascript’s more interesting features is that it can send and receive information behind the scenes. In a webpage, JS is used by lots of big companies to handle tracking and analytics. In an ePub3-formatted ebook, on a device that’s connected to the Internet, in an application that doesn’t explicitly block such connections, Javascript can be used in exactly the same way.

So what can it send? Well, anything that’s related to the ebook, more or less. The point at which you’re reading it. When you started it and how long you’ve been reading it for. The speed at which you read. It also sends the usual info associated with an Internet request, like location data – probably down to the country and city, don’t worry. Geotargeting when you don’t have GPS coordinates is a very fuzzy art. If the ebook has interactivity, it can send all kinds of info about how you interacted with it.

This is just off the top of my head, of course.

So there’s a couple of IFs involved here. IF the ebook is epub3, IF the ebook has the right code in it, IF it’s being read in a device that allows it, IF that device is connected to the Internet. Lots of IFs. But the thing is, it definitely works. I tested this myself using Calibre’s desktop ebook reader and a quick test epub3. Shocking, no? Are you worried?

Well – don’t be. Your ebooks can track you. But, by and large, it seems that they don’t.

Amazon don’t support scripting of any kind in their Kindle books. They’ve no need to – any info that an ebook could report back using JS, they’ve already got simply because you’re reading a Kindle ebook in the Kindle app. Kobo supports limited scripting, as does iBooks, but I can’t find a whisper that they do this kind of tracking, probably for the same reason as Amazon – it’s entirely redundant when people use your app. JS tracking inside an ebook would really only be useful for authors and publishers, and surprise surprise – the retailers don’t want to share that info. If they did, then they’d probably open themselves up to privacy-related legal shenanigans.

But, and here’s a big but (hah!), if there was a service out there that DID support JS tracking, you can bet that the smarter publishers and indie authors would be all over it. You could even bet that a new tracking ecosystem would grow up around it, just like what we saw when Internet advertising took off.

Watch this space, my friends. There’s a lot of really intelligent people out there working on this stuff. It’s exciting as hell if you’re on the supply side – but if you’re a reader? Well… better check what e-reader you’re using.