{"id":15888879,"url":"https://github.com/markrickert/motion_panel","last_synced_at":"2025-10-24T11:46:59.881Z","repository":{"id":30657035,"uuid":"34212705","full_name":"markrickert/motion_panel","owner":"markrickert","description":"A native Rubymotion wrapper around the Mixpanel API","archived":false,"fork":false,"pushed_at":"2015-04-19T23:00:01.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-29T05:41:01.174Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markrickert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-19T15:43:35.000Z","updated_at":"2019-08-27T01:45:16.000Z","dependencies_parsed_at":"2022-08-30T06:41:29.378Z","dependency_job_id":null,"html_url":"https://github.com/markrickert/motion_panel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markrickert/motion_panel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markrickert%2Fmotion_panel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markrickert%2Fmotion_panel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markrickert%2Fmotion_panel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markrickert%2Fmotion_panel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markrickert","download_url":"https://codeload.github.com/markrickert/motion_panel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markrickert%2Fmotion_panel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264916028,"owners_count":23682957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T06:40:25.533Z","updated_at":"2025-10-24T11:46:54.832Z","avatar_url":"https://github.com/markrickert.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MotionPanel\nA native [RubyMotion](http://www.rubymotion.com/) wrapper around the [Mixpanel](https://mixpanel.com/) API.\n\nFor updates, find me [here](http://www.tombroomfield.com) or [follow me on twitter](https://twitter.com/tom_broomfield)\n\n##Installation\nMotionPanel requires the [AFMotion](https://github.com/clayallsopp/afmotion) library, please ensure it is installed correctly.\n\nGemfile\n```ruby\ngem 'motion_panel'\n```\n\nRakefile\n``` ruby\nrequire 'motion_panel'\n```\n\nthen run bundle install and you should be good to go.\n\n\n##Tracking an event\nBefore you start tracking events, you must initialize it with your project token.\n\n```ruby\nMixpanel.shared_instance_with_token(YOUR_MIXPANEL_TOKEN)\n```\nFrom then on, you can simple access the client without the token:\n\n```ruby\nMixpanel.shared_instance\n```\n\nYou can then use the shared instance to track events:\n\n```ruby\nMixpanel.shared_instance.track('Example event', attribute: 'Value', second_attribute: 'Second value')\n```\n\nThe following attributes will be included by default for every call:\n- app_version\n- ios_version\n- orientation\n- resolution\n- retina?\n\n## Tracking people\nEvery user must have a distinct_id, this could be a database ID or an email address.\n\nTo track a user\n\n```ruby\nMixpanel.shared_instance.people.set(distinct_id, '$first_name' =\u003e 'Tom',\n                                                 '$last_name' =\u003e 'Broomfield',\n                                                 'occupation' =\u003e 'Developer')\n\n```\nPlease be aware that the properties with the '$' prefix are special Mixpanel attributes. Refer to the Mixpanel documentation for more information.\n\nYou can also use the set_once method. This will work in the same way to the set method, except it will not overwrite existing property values. This is useful for properties like \"First login date\".\n\n```ruby\nMixpanel.shared_instance.people.set_once(distinct_id, 'First login' =\u003e '19/04/2015')\n```\n\nThe add method will increment numerical values. A great example of this is tracking sign in count.\n\n```ruby\nMixpanel.shared_instance.people.add(distinct_id, 'Log in count' =\u003e 1)\n```\n\n##Config\nConfiguration can be changed through the Mixpanel.config object.\n\n```ruby\nMixpanel.config.disable_on_simulator # Blocks all calls if device is a simulator. Default: false\nMixpanel.config.disable_in_development # Blocks all calls if app is in development environment. Default: false\nMixpanel.config.disable_in_test # Blocks all calls if app is in the test environment. Default: true\n```\n\n##TODO\n- Block on development and test environment configuration option.\n- Better exceptions.\n- Alternate interface for a better Ruby experience.\n\nFeel free to shoot through a PR or open an issue.\n\nThankyou to the incredible people at [Mixpanel](https://mixpanel.com/) and [RubyMotion](http://www.rubymotion.com/) for the great services they provide to developers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkrickert%2Fmotion_panel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkrickert%2Fmotion_panel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkrickert%2Fmotion_panel/lists"}