Created
October 25, 2013 17:40
-
-
Save mberman84/7158727 to your computer and use it in GitHub Desktop.
Load Mixpanel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def load_mixpanel | |
@mixpanel ||= Mixpanel::Tracker.new "#{mixpanel_key}", { :env => request.env } | |
if current_user | |
@mixpanel.append_people_identify mixpanel_distinct_id | |
mixpanel_set(mixpanel_distinct_id, current_user.mixpanel_properties) | |
@mixpanel.append("name_tag", current_user.email) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment