Tracking link maths

galaxy

How long does a tracking link need to be?

Let’s make it interesting, and say we want to be able to have a unique tracking link for every single atom in the observable universe.

That’s about 1080 unique links.

One hundred novemdecillion exa-links.

100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

If we have that many customers we can afford to buy an expensive domain name and dedicate it to click tracking. Let’s use “z.zz” as our example domain – that’s not implausible, there are domains that short in use by individuals.

So our URL is going to look something like this:

https://z.zz/<something goes here>Code language: HTML, XML (xml)

That’s 13 characters, plus the “something goes here” bit.

We need to encode 1080 different values. If we take the logarithm of that to base two it’s a shade over 265, so we can encode it in 266 bits of data.

We need to convert those 266 bits of data to a text string.

One of the regular ways of doing that is to use base64 encoding. We use that a lot in email already, to convert binary files to text so we can attach them to an email. Base64 uses a list of 64 different characters (A-Z, a-z, 0-9 and a couple more) to encode things, hence the name. 64 is 26 meaning we can encode 6 bits in each character, so with 44 characters we can encode 268 bits of information, which is more than enough. Adding in the 13 characters for the https bit gives us 57 characters in total, for a tracking link for every atom.

We can do better, though. If we read the spec for URLs carefully we find 21 punctuation characters we can use in the path of a URL. Adding A-Z, a-z and 0-9 gives us 93 characters. log2 of 93 is a little over 6.53, so we can encode 6.53 bits in each (ascii) character. 266 divided by 6.53 is about 40.5, so we need about 41 characters to encode every atom using Bas93 encoding. Adding in the 13 characters for the https bit gives us 54 characters.

So if you need to encode a click tracking link for every atom in the observable universe you can use a 54 character long URL that looks something like this:

https://z.zz/u,Oz0Xrp0_Xrz=0rX2IE?Ti62LF2)@a];tyu*qkhBCode language: JavaScript (javascript)

Fits on a single line without wrapping easily.

If you don’t have quite 1080 unique links across all your customers then you can make them a little shorter.

If you’re actually doing this you might want to use a slightly smaller set of characters. Something like Base85 with an alphabet that avoids “#” and “/” might be better, but you have a lot of encodings to choose from.

Related Posts

Tools!

I just added a DMARC validation tool over on tools.wordtothewise.com.

You can give it a domain – such as ebay.com – and it will fetch the DMARC record, then explain and validate it. Or you can paste the DMARC record you’re planning to publish into it,  to validate it before you go live.
If you’ve not seen our tools page before, take a look. As well as DMARC we have a DKIM validator, SPF expander and optimizer, general DNS lookup tools, a bunch of RFCs covering all sorts of protocols, and base64 and quoted-printable decoders.
There’s also a widget that lets you add those little unicode pictures to your subject lines, whether you need a snowman ⛄, a forest ????, or a pig getting closer ???.
The results pages all have easily copyable URLs so they’re pretty good for sharing with co-workers or customers if you need that sort of thing.
(And if you need a cidr calculator, whois, or easy access to abuse.net & Microsoft SNDS check out Al’s xnnd.com.)

Read More

iOS17 filtering click tracking links

I’ve heard quite a bit of concern about what iOS 17’s automatic removal of click-tracking parameters means, but less discussion of what it actually does.

Read More

Reporting email disposition

Most regular readers know I think open and click through rates are actually proxy measurements. That is they measure things that correlate with reading and interacting with an email and can be used to estimate how much an email is wanted by the recipients.
The holy grail is, of course, having ISPs report back exact metrics on what a user did with an email. Did the user read it? Did it stay open on their screen a long time? Did the user just mark it read or throw it away? What happened to the message. Marketers would love this information.
It’s unlikely the ISPs will ever provide this information to marketers. Take away all the technical challenges, and there are some significant ones there are still social challenges to making this data available. Current user contracts protect the privacy of the user, local laws prohibit sharing this data. And, there is the vocal group of privacy advocates that will protest and raise a big stink.
I’m not sure why email is gets the special treatment of expecting the channel owners to provide detailed disposition data. In no other direct marketing venue is that information collected or provided. TV stations can’t tell advertisers whether or not someone watched a commercial, fast forwarded through it or got up to grab a beer from the fridge. The post office can’t tell direct mail marketers whether or not a recipient read the mail or just dumped it in the big recycling bin the post office provides for unwanted messages. Billboard owners can’t tell advertisers how many people read the billboard.
Since we can’t get exact read rates from ISPs, what do we do? We look at proxy numbers.
Read rate directly measures who opened the message. Open rate is a proxy. It’s who displayed images in the message.
Read rate can be measured only by people who have access to the user’s inbox. The ISPs can measure read rate because they have full access to the mailbox, but this requires the user to access the mailbox through webmail or IMAP. Some third party mailbox addons can measure it, but this requires the cooperation of the mailbox owner. If the mailbox owner doesn’t install the reporting tool, then the 3rd party doesn’t have access to the data. Only groups with access to the end users mailbox can measure this rate.
Open rate can be measured by people who have access to the server images are hosted. Senders and ESPs and 3rd parties can measure it if they provide unique image IDs or tracking pixels in their emails. Open tracking does require the cooperation of the recipient – they have to have images on. No images on, no open tracking. Ironically, ISPs cannot measure open rate, because they have no access to the image hosting servers.
Click rate can be measured by people who have access to the server that hosts the website. The same people who can measure opens can measure clicks. Some ISPs can measure clicks, Hotmail used to pass every URL through a proxy they hosted and they could count clicks this way. AOL controls the client so they could measure number of clicks on a link. I’ve heard trustworthy folks claim that ISPs are measuring clicks and that they’re not measuring clicks (any of the Barry’s want to comment?).
Without controlling the inbox, though, senders have to rely on proxy measurements to judge the effectiveness of any particular campaign. But at least email marketers have proxies to use for measurement.

Read More