Skip to content

Comment on Show HN: Mixpanel Event Queueing Wrapperparent

Comments

You should probably use the magic arguments array in your function to avoid the ugly array you are using as the second argument.

    _meq.push("track",["event_name",{property_name: "value"}])
becomes
    _meq.push("track","event_name",{property_name: "value"})
By changing the top of the mixpanel function to:
    mixpanel: function() { 
        var mixPanelArgs = Array.prototype.slice.call( arguments );
        var functionName = mixPanelArgs.shift();

Ah, great point. Missed that. Updated and going to push update shortly. Thank you.

[EDIT] Pushed. Great catch, thanks again.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.