How email tracking works ?
Have you ever wondered how could someone knows if you read their email or not ?
How it works ?
When you click a link some where over the internet, a request is sent to some server where it’s being processed. That’s exactly what happens here.
That’s if you clicked a link, but I am still tracked even though I didn’t click any links!
Imagine this, when you load a website client requests some data from the server and automatically makes some requests even though you just did one single GET request (initial request).
When you open up some email with a embedded image, a request is made through some proxy.
Since we don’t have control over the image(link), we can create our server to process it and notify read to us. And there is a trick to hide that image by sending 1X1 pixel image.
Implementation
I am going to build the server in nodejs for simplicity.
Requirements
- I am using the
httppackage to create a server, I could have usedexpressbut it’s overkill for this example. dotenvto save environment secrets.twiliofor api, could have used the vanilahttpspackage to send the request.
And finally when the email is read!
Say Hello :D
Sponsor