the MMM blog

How to setup Email tracking pixel

How to setup Email tracking pixel

An email tracking pixel is a transparent image, measuring one pixel by one pixel, that can used for tracking opened rate or click through rate. The image looks like:


Or if you need a black one

<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=">


So in your website, you need to have a url which returns the above image.

In MVC, you can have a controller like:

public FileContentResult Track(string trackingid="")
   // process your trackingid
   return new FileContentResult(Convert.FromBase64String(gif1x1), "image/gif");


header('Content-Type: image/gif');


Then put the URL in your email template, something like:

<img src="[trackingid]" style="display:none"/>


So the image is 1px by 1px transparent image which won't affect your template, but you can start processing the tracking id on your website. The same method can be applied to button click as well if you want to track your email click through rate.

"What we think, we become"

Contact me!

Have questions? Feel free to use the form or send me an email with any questions.

I will be responsive to your requests and your questions.