{"action":"created","issue":{"url":"https://api.github.com/repos/splitbrain/dokuwiki/issues/1150","labels_url":"https://api.github.com/repos/splitbrain/dokuwiki/issues/1150/labels{/name}","comments_url":"https://api.github.com/repos/splitbrain/dokuwiki/issues/1150/comments","events_url":"https://api.github.com/repos/splitbrain/dokuwiki/issues/1150/events","html_url":"https://github.com/splitbrain/dokuwiki/pull/1150","id":76738529,"number":1150,"title":"Plugins can send usage data","user":{"login":"gturri","id":308601,"avatar_url":"https://avatars.githubusercontent.com/u/308601?v=3","gravatar_id":"","url":"https://api.github.com/users/gturri","html_url":"https://github.com/gturri","followers_url":"https://api.github.com/users/gturri/followers","following_url":"https://api.github.com/users/gturri/following{/other_user}","gists_url":"https://api.github.com/users/gturri/gists{/gist_id}","starred_url":"https://api.github.com/users/gturri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gturri/subscriptions","organizations_url":"https://api.github.com/users/gturri/orgs","repos_url":"https://api.github.com/users/gturri/repos","events_url":"https://api.github.com/users/gturri/events{/privacy}","received_events_url":"https://api.github.com/users/gturri/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/splitbrain/dokuwiki/labels/Feature","name":"Feature","color":"009800"},{"url":"https://api.github.com/repos/splitbrain/dokuwiki/labels/ToDo:%20needDocUpdate","name":"ToDo: needDocUpdate","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-15T14:14:09Z","updated_at":"2015-05-27T05:54:13Z","closed_at":"2015-05-27T05:31:35Z","pull_request":{"url":"https://api.github.com/repos/splitbrain/dokuwiki/pulls/1150","html_url":"https://github.com/splitbrain/dokuwiki/pull/1150","diff_url":"https://github.com/splitbrain/dokuwiki/pull/1150.diff","patch_url":"https://github.com/splitbrain/dokuwiki/pull/1150.patch"},"body":"They just need to register to the PLUGIN_USAGE_DATA event, and then to add\r\neither a simple string, or an array of key / value. For example:\r\n\r\n    function register(Doku_Event_Handler $controller) {\r\n      $controller->register_hook('PLUGIN_USAGE_DATA', 'AFTER', $this, 'usage_data');\r\n    }\r\n\r\n    function usage_data(&$event){\r\n      $event->data['my_plugin_name'] = 'my usage data';\r\n\r\n      //or: $event->data['my_plugin_name'] = array ('k1' => 'v1', 'k2' => 'v2');\r\n    }"},"comment":{"url":"https://api.github.com/repos/splitbrain/dokuwiki/issues/comments/105766433","html_url":"https://github.com/splitbrain/dokuwiki/pull/1150#issuecomment-105766433","issue_url":"https://api.github.com/repos/splitbrain/dokuwiki/issues/1150","id":105766433,"user":{"login":"gturri","id":308601,"avatar_url":"https://avatars.githubusercontent.com/u/308601?v=3","gravatar_id":"","url":"https://api.github.com/users/gturri","html_url":"https://github.com/gturri","followers_url":"https://api.github.com/users/gturri/followers","following_url":"https://api.github.com/users/gturri/following{/other_user}","gists_url":"https://api.github.com/users/gturri/gists{/gist_id}","starred_url":"https://api.github.com/users/gturri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gturri/subscriptions","organizations_url":"https://api.github.com/users/gturri/orgs","repos_url":"https://api.github.com/users/gturri/repos","events_url":"https://api.github.com/users/gturri/events{/privacy}","received_events_url":"https://api.github.com/users/gturri/received_events","type":"User","site_admin":false},"created_at":"2015-05-27T05:54:13Z","updated_at":"2015-05-27T05:54:13Z","body":"Thanks!\r\n\r\nI just documented this feature on https://www.dokuwiki.org/devel:plugin_programming_tips#sending_popularity_data"}}