Closed (fixed)
Project:
Mixpanel
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
4 Dec 2012 at 21:12 UTC
Updated:
20 Sep 2013 at 21:04 UTC
This week I'm in the process of moving one of my sites to Drupal 7. I'd like to take the Mixpanel analytics with it! I'm creating this issue and assigning it to myself so that no one else starts working a Drupal 7 port at the same time.
Because we're making the jump to Drupal 7, I'm going to do the following additional things:
If anyone objects to any of these assertions, please let me know! I won't be making a stable release for Drupal 7 for a couple weeks anyway, so we'll have plenty of time to discuss.
Please let me know what you think!
Regards,
David.
Comments
Comment #1
dsnopekThere is now a 7.x-1.x branch. The core 'mixpanel' module works fully and most of 'mixpanel_defaults'. I haven't been able to successfully test Organic Groups or Spaces under Drupal 7, so the 'og' bits in 'mixpanel_defaults' aren't fully ported or tested and 'mixpanel_spaces' looks like it should work (spaces APIs haven't changed) but I didn't test it.
I added a few additional changes in this branch:
We can backport these features to the Drupal 6 branch later.
I'm going to keep this issue open until I can finish 'mixpanel_defaults' and 'mixpanel_spaces' because those are regressions.
Comment #2
incaic commented@dsnopek
What do you think about modifying mixpanel.js to use mixpanel.alias() ?
I set usealias in my own custom _js_alter() when needed, which is at first login as well as when changing username.
Comment #3
dsnopekI definitely think mixpanel.alias() is useful, especially in conjunction with anonymous users! Thanks for the suggestion!
However, this should really be a seperate issue in the issue queue - this one is just about completing the Drupal 7 port. If you create a new issue and make a patch which also includes a new checkbox on the settings page to enable this, I'd definitely consider merging it. :-)
Thanks!
Regards,
David.
Comment #4
dsnopekNow that #1874942: Include the mixpanel_rules module? has been merged, the
mixpanel_rulesmodule will also need to be updated to Drupal 7.Comment #5
solovelyhere commentedHiya -
sorry I'm new but was wondering how to actually integrate the dev module with drupal. I already installed it as well as configured it with my mixpanel token but mixpanel is still unable to detect it sending data?
Any help would be so much appreciated as I am rather desperate!
Thanks! (:
Comment #6
dsnopekHi @solovelyhere,
I don't think Mixpanel will detect that you've installed it until you send some events and by default the Mixpanel module just provides an API for sending events - it doesn't send any itself.
So, you can (1) install the "mixpanel_defaults" module which will send some precreated events, (2) use the "mixpanel_rules" module to create some Rules to send events or (3) write your own module which uses the provided API to send some events.
If you have any more questions, please open a new issue! (This issue is about finishing the Drupal 7 port, so it's not really the appropriate place for support)
Best regards,
David.
Comment #7
incaic commentedFinally got around to packaging this up. I also went ahead and made a few other non-critical mods.
http://drupal.org/node/1990628
It works great for me! :-)
EDIT: Referring to comment above: http://drupal.org/node/1858472#comment-6876310
Comment #8
dsnopekI was finally able to setup Organic Group and test the integration in mixpanel_defaults! Everything is working now.
I also made the executive decision to simply remove 'mixpanel_spaces'.
The current supported 'spaces' for Drupal 7 doesn't work with the current supported 'og'! Also, the mixpanel_spaces_context_page_reaction() function appears to be Open Atrium 1.x specific and since Open Atrium 1.x is Drupal 6 only, this doesn't make any sense in the Drupal 7 version of this module!
In fact, I'd say the future of 'spaces' is pretty unclear right now.
If someone does successfully use 'spaces' for something in Drupal 7, they can pretty easily add the information this modules used to add in their custom module or with Rules...
Comment #9
dsnopekI finally got mixpanel_rules fully working under Drupal 7! This means that from a code perspective, everything necessary for a D7 release is finished. I'll make a 7.x-1.0-rc1 release in a moment.