zevarito/mixpanel — Issue #22: No option to stop inclusion of javascript initialization
Author: smidwap
Created: 2011-11-28 17:29:19+00:00
State: open

Hi, ran into another issue: weird things happen if I am both using the mixpanel gem and manually coding mixpanel events in my views. The problem occurs if I am tracking events in the

tag. The mixpanel gem will insert another mixpanel initialization script (i.e. setting up the "mpq" variable) before the end of the head tag, which stops my events from being tracked. So, the head code looks something like:

Init mixpanel manually
Track some events
Mixpanel gem inserts another mixpanel init script

The problem is fixed if I move my event tracking to the body tag, but it seems like there should be an option to stop the gem from insert the mixpanel init script.