Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow overriding of token, time, and ip address

  • Loading branch information...
commit 0d358a1f63f48bf89413bd3c88344131b1d40d42 1 parent af46134
@joevandyk authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/mixpanel/tracker.rb
View
4 lib/mixpanel/tracker.rb
@@ -37,7 +37,9 @@ def append_api(type, *args)
end
def track_event(event, properties = {})
- params = build_event(event, properties.merge(:token => @token, :time => Time.now.utc.to_i, :ip => ip))
+ options = { :token => @token, :time => Time.now.utc.to_i, :ip => ip }
+ options.merge!(properties)
+ params = build_event(event, options)
parse_response request(params)
end
Please sign in to comment.
Something went wrong with that request. Please try again.