mixpanel-js
mixpanel-js copied to clipboard
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.