Closed jochu closed 11 years ago
Hello @jochu!
Please look at my comment in here: https://github.com/zevarito/mixpanel/issues/59#issuecomment-11640333
A few things...
Thanks!
I'm out right now but I'll take a look when I get back.
@zevarito Updated to include ignore_time
, documentation, and test.
I am sorry but cannot get your code working that is not working : mixpanel.set {:distinct_id => ''....', :ip => "127.0.0.1"}, {:status => "spiffy"}
Or @env is not defined where do you define it ? wouldn't it be simplier to replace @env with request.env ? so that you don't have to define it ?
Even with testing with that : mixpanel.delay.set { :distinct_id => 'john-doe', :ignore_time => true }, { :age => 31, :email => 'john@doe.com' } I have an error /Users/jeremy/Sites/pockiz/app/controllers/registrations_controller.rb:58: syntax error, unexpected tASSOC, expecting '}' ...nel.delay.set { :distinct_id => 'john-doe', :ignore_time => ... ... ^ /Users/jeremy/Sites/pockiz/app/controllers/registrations_controller.rb:58: syntax error, unexpected ',', expecting '}' ...t { :distinct_id => 'john-doe', :ignore_time => true }, { :a... ... ^
Thanks
@jaybbb
... syntax error ...
Oops, sorry - the documentation is a bit off. It should be
mixpanel.set({:distinct_id => 'john-doe', :ignore_time => true}, {:age => 31, :email => 'john@doe.com'})
The surrounding parens are important.
@zevarito It's just adding parens to the documentaiton. I can make a pull request if you want. Just let me know.
Yes pelease do.
Sent from a placea where internet isn't a sure thing. On Dec 26, 2012 3:50 PM, "Jeffrey Chu" notifications@github.com wrote:
@jaybbb https://github.com/jaybbb
... syntax error ...
Oops, sorry - the documentation is a bit off. It should be
mixpanel.set({:distinct_id => 'john-doe', :ignore_time => true}, {:age => 31, :email => 'john@doe.com'})
The surrounding parens are important.
@zevarito https://github.com/zevarito It's just adding parens to the documentaiton. I can make a pull request if you want. Just let me know.
— Reply to this email directly or view it on GitHubhttps://github.com/zevarito/mixpanel/pull/62#issuecomment-11690698.
Sets the geolocation ip automatically based on the provided env.
For those who won't necessarily have a sane env around, I've also updated it so you can set the geolocation ip by doing:
This change is backward compatible - simply providing a distinctid as the first argument will still work. This change does not apply to append series of methods because those will automatically use the javascript behavior.