mixpanel/mixpanel-js — pull request #3 by EricByers (2014-06-18 16:49:14+00:00)
Title: Image Tracking Doubles Request in Chrome

In Chrome (and potentially others) setting the img.src before appending it to the Dom triggers the img to be loaded. It also can be loaded again when it is attached to the DOM, causing a double track.

Moving the setting of the src till after it is appended alleviates this issue.