{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1595","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1595/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1595/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1595/events","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/1595","id":78157184,"number":1595,"title":"Record IDFV For Internal Billing","user":{"login":"bleege","id":989928,"avatar_url":"https://avatars.githubusercontent.com/u/989928?v=3","gravatar_id":"","url":"https://api.github.com/users/bleege","html_url":"https://github.com/bleege","followers_url":"https://api.github.com/users/bleege/followers","following_url":"https://api.github.com/users/bleege/following{/other_user}","gists_url":"https://api.github.com/users/bleege/gists{/gist_id}","starred_url":"https://api.github.com/users/bleege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleege/subscriptions","organizations_url":"https://api.github.com/users/bleege/orgs","repos_url":"https://api.github.com/users/bleege/repos","events_url":"https://api.github.com/users/bleege/events{/privacy}","received_events_url":"https://api.github.com/users/bleege/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/iOS","name":"iOS","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"bleege","id":989928,"avatar_url":"https://avatars.githubusercontent.com/u/989928?v=3","gravatar_id":"","url":"https://api.github.com/users/bleege","html_url":"https://github.com/bleege","followers_url":"https://api.github.com/users/bleege/followers","following_url":"https://api.github.com/users/bleege/following{/other_user}","gists_url":"https://api.github.com/users/bleege/gists{/gist_id}","starred_url":"https://api.github.com/users/bleege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleege/subscriptions","organizations_url":"https://api.github.com/users/bleege/orgs","repos_url":"https://api.github.com/users/bleege/repos","events_url":"https://api.github.com/users/bleege/events{/privacy}","received_events_url":"https://api.github.com/users/bleege/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/milestones/7","html_url":"https://github.com/mapbox/mapbox-gl-native/milestones/iOS%20Beta%202","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/milestones/7/labels","id":1019113,"number":7,"title":"iOS Beta 2","description":"","creator":{"login":"incanus","id":17722,"avatar_url":"https://avatars.githubusercontent.com/u/17722?v=3","gravatar_id":"","url":"https://api.github.com/users/incanus","html_url":"https://github.com/incanus","followers_url":"https://api.github.com/users/incanus/followers","following_url":"https://api.github.com/users/incanus/following{/other_user}","gists_url":"https://api.github.com/users/incanus/gists{/gist_id}","starred_url":"https://api.github.com/users/incanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incanus/subscriptions","organizations_url":"https://api.github.com/users/incanus/orgs","repos_url":"https://api.github.com/users/incanus/repos","events_url":"https://api.github.com/users/incanus/events{/privacy}","received_events_url":"https://api.github.com/users/incanus/received_events","type":"User","site_admin":false},"open_issues":50,"closed_issues":27,"state":"open","created_at":"2015-03-12T17:38:21Z","updated_at":"2015-05-19T19:37:42Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-05-19T16:24:39Z","updated_at":"2015-05-19T21:08:44Z","closed_at":null,"body":"In order to Mapbox to monitor usage for billing purposes, it needs to be able to count the number of Unique Users per customer.  This will be done using the [iOS's IDFV](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/#//apple_ref/occ/instp/UIDevice/identifierForVendor).\r\n\r\nOne `MapboxEndUser` event will be sent to the Mapbox Events API from the `MGLAccountManager` constructor.  This is possible because all implementing apps will need to / eventually will call directly or indirectly (ex: `-[MGLMapView setAccessToken]`) at some point:\r\n\r\n* `+[MGLAccountManager setAccessToken:]`\r\n* `+[MGLAccountManager setMapboxMetricsEnabledSettingShownInApp:]`\r\n\r\n@mapbox/mobile @mapbox/mobiledata @pdgoodman "},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/comments/103667836","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/1595#issuecomment-103667836","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1595","id":103667836,"user":{"login":"bleege","id":989928,"avatar_url":"https://avatars.githubusercontent.com/u/989928?v=3","gravatar_id":"","url":"https://api.github.com/users/bleege","html_url":"https://github.com/bleege","followers_url":"https://api.github.com/users/bleege/followers","following_url":"https://api.github.com/users/bleege/following{/other_user}","gists_url":"https://api.github.com/users/bleege/gists{/gist_id}","starred_url":"https://api.github.com/users/bleege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleege/subscriptions","organizations_url":"https://api.github.com/users/bleege/orgs","repos_url":"https://api.github.com/users/bleege/repos","events_url":"https://api.github.com/users/bleege/events{/privacy}","received_events_url":"https://api.github.com/users/bleege/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T21:08:44Z","updated_at":"2015-05-19T21:08:44Z","body":"Ah yeah... was just noticing that there's always and instance of `MGLMapboxEvents` thanks [to this](https://github.com/mapbox/mapbox-gl-native/blob/f74fe69cb85d544e84d6a7ecab1d742ffdf87828/platform/ios/MGLAccountManager.m#L55).\r\n\r\n>  think it’d be bad for any class’s `+load` to attempt network requests.\r\n\r\nAgreed.  The logical way now seems to add this as a regular event and do a quick flush from the startup block in `+[MGLMapboxEvents sharedManager]`.  It also has the added benefit of getting to reuse the events transportation infrastructure.\r\n\r\n"}}