{"action":"opened","number":331,"pull_request":{"url":"https://api.github.com/repos/OpenTreeMap/otm-ios/pulls/331","id":93622243,"html_url":"https://github.com/OpenTreeMap/otm-ios/pull/331","diff_url":"https://github.com/OpenTreeMap/otm-ios/pull/331.diff","patch_url":"https://github.com/OpenTreeMap/otm-ios/pull/331.patch","issue_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/issues/331","number":331,"state":"open","locked":false,"title":"Track app view loads using Google Analytics","user":{"login":"RickMohr","id":2162993,"avatar_url":"https://avatars.githubusercontent.com/u/2162993?v=3","gravatar_id":"","url":"https://api.github.com/users/RickMohr","html_url":"https://github.com/RickMohr","followers_url":"https://api.github.com/users/RickMohr/followers","following_url":"https://api.github.com/users/RickMohr/following{/other_user}","gists_url":"https://api.github.com/users/RickMohr/gists{/gist_id}","starred_url":"https://api.github.com/users/RickMohr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RickMohr/subscriptions","organizations_url":"https://api.github.com/users/RickMohr/orgs","repos_url":"https://api.github.com/users/RickMohr/repos","events_url":"https://api.github.com/users/RickMohr/events{/privacy}","received_events_url":"https://api.github.com/users/RickMohr/received_events","type":"User","site_admin":false},"body":"* Add Cocoapods\r\n* Add `AppGoogleAnalyticsId` to `Implementation.plist.template`\r\n\r\nAdd common superclasses for view tracking:\r\n* Google provides `GAITrackedViewController` and suggests using it in place of `UIViewController` for automatic view tracking. That's fine, but it doesn't handle views that are subclasses of `UITableViewController`. Since we have to handle those ourselves I decided to handle all of them ourselves.\r\n* `OTMUIViewController` is the superclass of all OTM `UIViewController`s\r\n* `OTMTableViewController` is the superclass of all OTM `UITableViewController`s\r\n* They override `viewDidAppear`, and send a Google Analytics \"screen view\" event.\r\n* If the subclass hasn't defined a screen name, use its class name instead.\r\n\r\nSet screen names when views are loaded\r\n* Set screen name in `viewDidLoad` methods\r\n* Remove `initWithNibName` methods -- they are never called.\r\n* Remove `initWithStyle` methods -- they are never called.\r\n\r\nThere were more baffling linker errors, finally resolved by adding libraries via OpenTreeMap > Build Phases > Link Binary With Libraries:\r\n* iOS 10.0 > CoreData.Framework\r\n* iOS 10.0 > libsqlite3.tbd\r\n* Add Other > OpenTreeMap > Pods > GoogleAnalytics > Libraries > libGoogleAnalytics.a\r\n\r\nTesting:\r\n* Initialize Cocoapods:\r\n```\r\ncd OpenTreeMap\r\nsudo gem install cocoapods\r\npod install\r\n```\r\n* In XCode, clean and build project. It should build without errors and run as usual.\r\n* Filter the debug log by `&cd` (which contains the screen name when a \"hit\" is sent to Google Analytics)\r\n* As you go through the various app screens you should see the screen names in the log\r\n\r\nConnects #320 ","created_at":"2016-11-14T18:38:00Z","updated_at":"2016-11-14T18:38:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/pulls/331/commits","review_comments_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/pulls/331/comments","review_comment_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/issues/331/comments","statuses_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/statuses/e62dbc0bae6002119210923fd6f8740012b718c0","head":{"label":"OpenTreeMap:google-analytics","ref":"google-analytics","sha":"e62dbc0bae6002119210923fd6f8740012b718c0","user":{"login":"OpenTreeMap","id":1125635,"avatar_url":"https://avatars.githubusercontent.com/u/1125635?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenTreeMap","html_url":"https://github.com/OpenTreeMap","followers_url":"https://api.github.com/users/OpenTreeMap/followers","following_url":"https://api.github.com/users/OpenTreeMap/following{/other_user}","gists_url":"https://api.github.com/users/OpenTreeMap/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenTreeMap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenTreeMap/subscriptions","organizations_url":"https://api.github.com/users/OpenTreeMap/orgs","repos_url":"https://api.github.com/users/OpenTreeMap/repos","events_url":"https://api.github.com/users/OpenTreeMap/events{/privacy}","received_events_url":"https://api.github.com/users/OpenTreeMap/received_events","type":"Organization","site_admin":false},"repo":{"id":5907683,"name":"otm-ios","full_name":"OpenTreeMap/otm-ios","owner":{"login":"OpenTreeMap","id":1125635,"avatar_url":"https://avatars.githubusercontent.com/u/1125635?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenTreeMap","html_url":"https://github.com/OpenTreeMap","followers_url":"https://api.github.com/users/OpenTreeMap/followers","following_url":"https://api.github.com/users/OpenTreeMap/following{/other_user}","gists_url":"https://api.github.com/users/OpenTreeMap/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenTreeMap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenTreeMap/subscriptions","organizations_url":"https://api.github.com/users/OpenTreeMap/orgs","repos_url":"https://api.github.com/users/OpenTreeMap/repos","events_url":"https://api.github.com/users/OpenTreeMap/events{/privacy}","received_events_url":"https://api.github.com/users/OpenTreeMap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenTreeMap/otm-ios","description":"An OpenTreeMap client for iOS. The OpenTreeMap code can be downloaded at https://github.com/azavea/OpenTreeMap. ","fork":false,"url":"https://api.github.com/repos/OpenTreeMap/otm-ios","forks_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/forks","keys_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/teams","hooks_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/hooks","issue_events_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/issues/events{/number}","events_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/events","assignees_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/assignees{/user}","branches_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/branches{/branch}","tags_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/tags","blobs_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/languages","stargazers_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/stargazers","contributors_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/contributors","subscribers_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/subscribers","subscription_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/subscription","commits_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/contents/{+path}","compare_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/merges","archive_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/downloads","issues_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/issues{/number}","pulls_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/labels{/name}","releases_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/releases{/id}","deployments_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/deployments","created_at":"2012-09-21T21:33:17Z","updated_at":"2016-10-24T19:39:23Z","pushed_at":"2016-11-14T18:38:00Z","git_url":"git://github.com/OpenTreeMap/otm-ios.git","ssh_url":"git@github.com:OpenTreeMap/otm-ios.git","clone_url":"https://github.com/OpenTreeMap/otm-ios.git","svn_url":"https://github.com/OpenTreeMap/otm-ios","homepage":"http://www.azavea.com/opentreemap","size":3911,"stargazers_count":14,"watchers_count":14,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":94,"forks":20,"open_issues":94,"watchers":14,"default_branch":"master"}},"base":{"label":"OpenTreeMap:master","ref":"master","sha":"30dfb47272f094ff6e28d3031855333552dabdc6","user":{"login":"OpenTreeMap","id":1125635,"avatar_url":"https://avatars.githubusercontent.com/u/1125635?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenTreeMap","html_url":"https://github.com/OpenTreeMap","followers_url":"https://api.github.com/users/OpenTreeMap/followers","following_url":"https://api.github.com/users/OpenTreeMap/following{/other_user}","gists_url":"https://api.github.com/users/OpenTreeMap/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenTreeMap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenTreeMap/subscriptions","organizations_url":"https://api.github.com/users/OpenTreeMap/orgs","repos_url":"https://api.github.com/users/OpenTreeMap/repos","events_url":"https://api.github.com/users/OpenTreeMap/events{/privacy}","received_events_url":"https://api.github.com/users/OpenTreeMap/received_events","type":"Organization","site_admin":false},"repo":{"id":5907683,"name":"otm-ios","full_name":"OpenTreeMap/otm-ios","owner":{"login":"OpenTreeMap","id":1125635,"avatar_url":"https://avatars.githubusercontent.com/u/1125635?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenTreeMap","html_url":"https://github.com/OpenTreeMap","followers_url":"https://api.github.com/users/OpenTreeMap/followers","following_url":"https://api.github.com/users/OpenTreeMap/following{/other_user}","gists_url":"https://api.github.com/users/OpenTreeMap/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenTreeMap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenTreeMap/subscriptions","organizations_url":"https://api.github.com/users/OpenTreeMap/orgs","repos_url":"https://api.github.com/users/OpenTreeMap/repos","events_url":"https://api.github.com/users/OpenTreeMap/events{/privacy}","received_events_url":"https://api.github.com/users/OpenTreeMap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenTreeMap/otm-ios","description":"An OpenTreeMap client for iOS. The OpenTreeMap code can be downloaded at https://github.com/azavea/OpenTreeMap. ","fork":false,"url":"https://api.github.com/repos/OpenTreeMap/otm-ios","forks_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/forks","keys_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/teams","hooks_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/hooks","issue_events_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/issues/events{/number}","events_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/events","assignees_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/assignees{/user}","branches_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/branches{/branch}","tags_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/tags","blobs_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/languages","stargazers_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/stargazers","contributors_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/contributors","subscribers_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/subscribers","subscription_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/subscription","commits_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/contents/{+path}","compare_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/merges","archive_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/downloads","issues_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/issues{/number}","pulls_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/labels{/name}","releases_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/releases{/id}","deployments_url":"https://api.github.com/repos/OpenTreeMap/otm-ios/deployments","created_at":"2012-09-21T21:33:17Z","updated_at":"2016-10-24T19:39:23Z","pushed_at":"2016-11-14T18:38:00Z","git_url":"git://github.com/OpenTreeMap/otm-ios.git","ssh_url":"git@github.com:OpenTreeMap/otm-ios.git","clone_url":"https://github.com/OpenTreeMap/otm-ios.git","svn_url":"https://github.com/OpenTreeMap/otm-ios","homepage":"http://www.azavea.com/opentreemap","size":3911,"stargazers_count":14,"watchers_count":14,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":94,"forks":20,"open_issues":94,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenTreeMap/otm-ios/pulls/331"},"html":{"href":"https://github.com/OpenTreeMap/otm-ios/pull/331"},"issue":{"href":"https://api.github.com/repos/OpenTreeMap/otm-ios/issues/331"},"comments":{"href":"https://api.github.com/repos/OpenTreeMap/otm-ios/issues/331/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenTreeMap/otm-ios/pulls/331/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenTreeMap/otm-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenTreeMap/otm-ios/pulls/331/commits"},"statuses":{"href":"https://api.github.com/repos/OpenTreeMap/otm-ios/statuses/e62dbc0bae6002119210923fd6f8740012b718c0"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":421,"deletions":214,"changed_files":50}}
{"actor":{"display_login":"RickMohr"}}