I see this in the documentation:
Mixpanel tracks email open rates using pixel-based Event tracking. Mixpanel adds a URL directed to http://api.mixpanel.com/track/ into the src attribute of the HTML image tag within the email.
The format for the URL of the embedded image is the same as the URL for a regular Mixpanel request, except with &img=1 added to the end. By adding &img=1, Mixpanel will return a 1 pixel x 1 pixel transparent gif that triggers an event when it loads.
Does this mean I should be able to drop some URL into any email to track opens? If so, what is the format of said URL? Thanks All!
Best answer by raja
api.mixpanel.com/track?data={params}&img=1
If you have an email with the tracking image link embedded in the HTML, find the data={params} part of the URL from the example format above.
The params are url encoded + base64 encoded, after you decode them you should be able to figure out how the params are structured similar to a typical mixpanel.track()
SDK call.
Of course this isn’t publicly documented information so it is possible that the format may change in the future. To be fail-proof I would recommend making a simple endpoint on your webapp and embedding that endpoint as an <img>
tag in your email HTML.
The endpoint would just have to load the Mixpanel SDK and do a standard track()
call with your desired properties.