Search code examples
djangoimagetracking

django pixel tracking


I'm using django to do a pixel tracker on an email

Is it easy to return an actual image from a django view (and how would this be done?) or is it easier to just return a redirect to the url where the actual image lives?


Solution

  • You don't need an actual image for a tracker pixel. In fact, it's better if you don't have one.

    Just use the view as the source for the image tag, and have it return a blank response.