Hello!
Here is the problem:
Let's say I implement my own code to intercept hook_comment() and call mixpanel_track() when a comment is added. For example, let's say I wanted to add the properties from 'casetracker' to mixpanel properties when the current node is using 'casetracker'. My new event would appear, but so would the default 'comment-created' event from the 'mixpanel' module.
There is currently no way to disable the default tracking code built into the 'mixpanel'!
Attached is a patch to move all the of default tracking code to it's own module called 'mixpanel_defaults'. I'm not sure this is the greatest name for this module and invite any suggestions!
Related to this, I've started working on a mixpanel_rules module which will allow users to setup new Mixpanel events entirely in the UI. I could actually re-implement all of the default tracking stuff in 'mixpanel_defaults' as default rules, which could be disabled or changed according to user needs. This would allow much more flexibility!
Please let me know what you think!
Best regards,
David.
Comment | File | Size | Author |
---|---|---|---|
#6 | mixpanel-1827414-6.patch | 1.17 KB | dsnopek |
mixpanel_defaults.patch | 12.64 KB | dsnopek |
Comments
Comment #1
dsnopekMarking as 'needs review'.
Comment #2
dsnopekFYI, I did a bunch of work in my 'mixpanel_rules' sandbox today! I've added a 'mixpanel_rules_defaults' module which does all the stuff that 'mixpanel_defaults' does, but implemented using Rules. This would allow users to disable or change the events tracked via the UI, so they can customize them to their own needs.
I'm going to wait on a resolution for this issue, before promoting 'mixpanel_rules' to a full project.
Comment #3
wundo CreditAttribution: wundo commentedCommitted, thanks! :)
Comment #4
wundo CreditAttribution: wundo commentedDavid, you feedback is welcome here #1837826: Create a hook_update_n to enable mixpanel_defaults when updating Mixpanel :)
Comment #5
dsnopekThat's awesome, thanks!
My patch from this issue actually included a hook_update_N() function to do exactly this! Maybe you just didn't see it so you didn't 'git add' to put it in the repo? In any case, I'll attach the mixpanel.install file to that issue in a moment.
Thanks again!
Regards,
David.
Comment #6
dsnopekAck! I hate to re-open this issue, but I just noticed that I missed an event (user-view-profile) in my original patch.
Attached is a new patch against the latest in git, which moves the mixpanel_track() for that event into the 'mixpanel_defaults' module.
Sorry for the oversight! I've done a grep over the module for more stray uses of mixpanel_track() and there aren't any others.
Best regards,
David.
Comment #7
dsnopekCommitted patch in #6.