Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class ApplicationController < ActionController::Base
...
private
def track_event
mixpanel.track(event_user, event_name, event_properties)
end
def event_properties
{}
end
...
end
class OrdersController < ApplicationController
...
private
def event_properties
{ quantity: @order.quantity, meal_name: @order.meal.name }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment