payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mysociety/writetothem/pulls/comments/302651040","pull_request_review_id":260836728,"id":302651040,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwMjY1MTA0MA==","diff_hunk":"@@ -37,11 +37,25 @@\n $values['cobrand'] = $cobrand;\n \n \n-// Proxy Information Survey\n-\n-$rand = rand(0, 1); // high rate when want lots of data\n-if ($rand == 0) {\n-    template_draw(\"surveygizmo-proxy\", $values);\n+// SurveyGizmo survey hook\n+// Current url for local councillor name recognition survey\n+// https://www.surveygizmo.com/s3/5057760/WTT-Name-Recognition-Local-Council\n+\n+local_council_codes = ['DIW','CED','LBW','COP','LGE','MTW','UTE','UTW'];\n+$wrote_to_councillor = in_array($values[\"recipient_type\"], local_council_codes);\n+\n+$send_to_survey_gizmo = $wrote_to_councillor; \n+// use rand(0, 1); for a 50% referral rate \n+\n+if ($send_to_survey_gizmo == 1) {","path":"web/firsttime.php","position":19,"original_position":19,"commit_id":"7111bfd25f259492756875b3235ecdc356df64c0","original_commit_id":"7111bfd25f259492756875b3235ecdc356df64c0","user":{"login":"dracos","id":154364,"node_id":"MDQ6VXNlcjE1NDM2NA==","avatar_url":"https://avatars0.githubusercontent.com/u/154364?v=4","gravatar_id":"","url":"https://api.github.com/users/dracos","html_url":"https://github.com/dracos","followers_url":"https://api.github.com/users/dracos/followers","following_url":"https://api.github.com/users/dracos/following{/other_user}","gists_url":"https://api.github.com/users/dracos/gists{/gist_id}","starred_url":"https://api.github.com/users/dracos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dracos/subscriptions","organizations_url":"https://api.github.com/users/dracos/orgs","repos_url":"https://api.github.com/users/dracos/repos","events_url":"https://api.github.com/users/dracos/events{/privacy}","received_events_url":"https://api.github.com/users/dracos/received_events","type":"User","site_admin":false},"body":"As it's true/false, better to just have `if ($send_to_survey_gizmo) {`","created_at":"2019-07-11T17:07:32Z","updated_at":"2019-07-11T17:09:05Z","html_url":"https://github.com/mysociety/writetothem/pull/425#discussion_r302651040","pull_request_url":"https://api.github.com/repos/mysociety/writetothem/pulls/425","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mysociety/writetothem/pulls/comments/302651040"},"html":{"href":"https://github.com/mysociety/writetothem/pull/425#discussion_r302651040"},"pull_request":{"href":"https://api.github.com/repos/mysociety/writetothem/pulls/425"}}},"pull_request":{"url":"https://api.github.com/repos/mysociety/writetothem/pulls/425","id":284893486,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg0ODkzNDg2","html_url":"https://github.com/mysociety/writetothem/pull/425","diff_url":"https://github.com/mysociety/writetothem/pull/425.diff","patch_url":"https://github.com/mysociety/writetothem/pull/425.patch","issue_url":"https://api.github.com/repos/mysociety/writetothem/issues/425","number":425,"state":"open","locked":false,"title":"Turned off current survey and generalised surveygizmo template","user":{"login":"ajparsons","id":8157058,"node_id":"MDQ6VXNlcjgxNTcwNTg=","avatar_url":"https://avatars0.githubusercontent.com/u/8157058?v=4","gravatar_id":"","url":"https://api.github.com/users/ajparsons","html_url":"https://github.com/ajparsons","followers_url":"https://api.github.com/users/ajparsons/followers","following_url":"https://api.github.com/users/ajparsons/following{/other_user}","gists_url":"https://api.github.com/users/ajparsons/gists{/gist_id}","starred_url":"https://api.github.com/users/ajparsons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajparsons/subscriptions","organizations_url":"https://api.github.com/users/ajparsons/orgs","repos_url":"https://api.github.com/users/ajparsons/repos","events_url":"https://api.github.com/users/ajparsons/events{/privacy}","received_events_url":"https://api.github.com/users/ajparsons/received_events","type":"User","site_admin":false},"body":"The current wtt proxy use survey is turned off.\r\n\r\nThe survey title and url are moved up to firsttime.php so all config is in the same file.\r\n\r\nOld survey details left in place because the parameters are useful for next time","created_at":"2019-06-04T09:43:03Z","updated_at":"2019-07-11T17:09:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67500f9be5da9f30d301dd64cbfd82ee36da5ace","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mysociety/writetothem/pulls/425/commits","review_comments_url":"https://api.github.com/repos/mysociety/writetothem/pulls/425/comments","review_comment_url":"https://api.github.com/repos/mysociety/writetothem/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mysociety/writetothem/issues/425/comments","statuses_url":"https://api.github.com/repos/mysociety/writetothem/statuses/7111bfd25f259492756875b3235ecdc356df64c0","head":{"label":"mysociety:turn-off-proxy-survey","ref":"turn-off-proxy-survey","sha":"7111bfd25f259492756875b3235ecdc356df64c0","user":{"login":"mysociety","id":141338,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTMzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/141338?v=4","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"repo":{"id":478804,"node_id":"MDEwOlJlcG9zaXRvcnk0Nzg4MDQ=","name":"writetothem","full_name":"mysociety/writetothem","private":false,"owner":{"login":"mysociety","id":141338,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTMzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/141338?v=4","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mysociety/writetothem","description":"Write to your MP, MEP, & other elected representatives.","fork":false,"url":"https://api.github.com/repos/mysociety/writetothem","forks_url":"https://api.github.com/repos/mysociety/writetothem/forks","keys_url":"https://api.github.com/repos/mysociety/writetothem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mysociety/writetothem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mysociety/writetothem/teams","hooks_url":"https://api.github.com/repos/mysociety/writetothem/hooks","issue_events_url":"https://api.github.com/repos/mysociety/writetothem/issues/events{/number}","events_url":"https://api.github.com/repos/mysociety/writetothem/events","assignees_url":"https://api.github.com/repos/mysociety/writetothem/assignees{/user}","branches_url":"https://api.github.com/repos/mysociety/writetothem/branches{/branch}","tags_url":"https://api.github.com/repos/mysociety/writetothem/tags","blobs_url":"https://api.github.com/repos/mysociety/writetothem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mysociety/writetothem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mysociety/writetothem/git/refs{/sha}","trees_url":"https://api.github.com/repos/mysociety/writetothem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mysociety/writetothem/statuses/{sha}","languages_url":"https://api.github.com/repos/mysociety/writetothem/languages","stargazers_url":"https://api.github.com/repos/mysociety/writetothem/stargazers","contributors_url":"https://api.github.com/repos/mysociety/writetothem/contributors","subscribers_url":"https://api.github.com/repos/mysociety/writetothem/subscribers","subscription_url":"https://api.github.com/repos/mysociety/writetothem/subscription","commits_url":"https://api.github.com/repos/mysociety/writetothem/commits{/sha}","git_commits_url":"https://api.github.com/repos/mysociety/writetothem/git/commits{/sha}","comments_url":"https://api.github.com/repos/mysociety/writetothem/comments{/number}","issue_comment_url":"https://api.github.com/repos/mysociety/writetothem/issues/comments{/number}","contents_url":"https://api.github.com/repos/mysociety/writetothem/contents/{+path}","compare_url":"https://api.github.com/repos/mysociety/writetothem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mysociety/writetothem/merges","archive_url":"https://api.github.com/repos/mysociety/writetothem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mysociety/writetothem/downloads","issues_url":"https://api.github.com/repos/mysociety/writetothem/issues{/number}","pulls_url":"https://api.github.com/repos/mysociety/writetothem/pulls{/number}","milestones_url":"https://api.github.com/repos/mysociety/writetothem/milestones{/number}","notifications_url":"https://api.github.com/repos/mysociety/writetothem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mysociety/writetothem/labels{/name}","releases_url":"https://api.github.com/repos/mysociety/writetothem/releases{/id}","deployments_url":"https://api.github.com/repos/mysociety/writetothem/deployments","created_at":"2010-01-19T11:17:22Z","updated_at":"2019-07-01T09:41:30Z","pushed_at":"2019-07-11T12:36:12Z","git_url":"git://github.com/mysociety/writetothem.git","ssh_url":"git@github.com:mysociety/writetothem.git","clone_url":"https://github.com/mysociety/writetothem.git","svn_url":"https://github.com/mysociety/writetothem","homepage":"https://www.writetothem.com","size":10912,"stargazers_count":32,"watchers_count":32,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":130,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":9,"open_issues":130,"watchers":32,"default_branch":"master"}},"base":{"label":"mysociety:master","ref":"master","sha":"4c635411d7f50f5bf26d2ee5717712b6d8ef7459","user":{"login":"mysociety","id":141338,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTMzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/141338?v=4","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"repo":{"id":478804,"node_id":"MDEwOlJlcG9zaXRvcnk0Nzg4MDQ=","name":"writetothem","full_name":"mysociety/writetothem","private":false,"owner":{"login":"mysociety","id":141338,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTMzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/141338?v=4","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mysociety/writetothem","description":"Write to your MP, MEP, & other elected representatives.","fork":false,"url":"https://api.github.com/repos/mysociety/writetothem","forks_url":"https://api.github.com/repos/mysociety/writetothem/forks","keys_url":"https://api.github.com/repos/mysociety/writetothem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mysociety/writetothem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mysociety/writetothem/teams","hooks_url":"https://api.github.com/repos/mysociety/writetothem/hooks","issue_events_url":"https://api.github.com/repos/mysociety/writetothem/issues/events{/number}","events_url":"https://api.github.com/repos/mysociety/writetothem/events","assignees_url":"https://api.github.com/repos/mysociety/writetothem/assignees{/user}","branches_url":"https://api.github.com/repos/mysociety/writetothem/branches{/branch}","tags_url":"https://api.github.com/repos/mysociety/writetothem/tags","blobs_url":"https://api.github.com/repos/mysociety/writetothem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mysociety/writetothem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mysociety/writetothem/git/refs{/sha}","trees_url":"https://api.github.com/repos/mysociety/writetothem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mysociety/writetothem/statuses/{sha}","languages_url":"https://api.github.com/repos/mysociety/writetothem/languages","stargazers_url":"https://api.github.com/repos/mysociety/writetothem/stargazers","contributors_url":"https://api.github.com/repos/mysociety/writetothem/contributors","subscribers_url":"https://api.github.com/repos/mysociety/writetothem/subscribers","subscription_url":"https://api.github.com/repos/mysociety/writetothem/subscription","commits_url":"https://api.github.com/repos/mysociety/writetothem/commits{/sha}","git_commits_url":"https://api.github.com/repos/mysociety/writetothem/git/commits{/sha}","comments_url":"https://api.github.com/repos/mysociety/writetothem/comments{/number}","issue_comment_url":"https://api.github.com/repos/mysociety/writetothem/issues/comments{/number}","contents_url":"https://api.github.com/repos/mysociety/writetothem/contents/{+path}","compare_url":"https://api.github.com/repos/mysociety/writetothem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mysociety/writetothem/merges","archive_url":"https://api.github.com/repos/mysociety/writetothem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mysociety/writetothem/downloads","issues_url":"https://api.github.com/repos/mysociety/writetothem/issues{/number}","pulls_url":"https://api.github.com/repos/mysociety/writetothem/pulls{/number}","milestones_url":"https://api.github.com/repos/mysociety/writetothem/milestones{/number}","notifications_url":"https://api.github.com/repos/mysociety/writetothem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mysociety/writetothem/labels{/name}","releases_url":"https://api.github.com/repos/mysociety/writetothem/releases{/id}","deployments_url":"https://api.github.com/repos/mysociety/writetothem/deployments","created_at":"2010-01-19T11:17:22Z","updated_at":"2019-07-01T09:41:30Z","pushed_at":"2019-07-11T12:36:12Z","git_url":"git://github.com/mysociety/writetothem.git","ssh_url":"git@github.com:mysociety/writetothem.git","clone_url":"https://github.com/mysociety/writetothem.git","svn_url":"https://github.com/mysociety/writetothem","homepage":"https://www.writetothem.com","size":10912,"stargazers_count":32,"watchers_count":32,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":130,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":9,"open_issues":130,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mysociety/writetothem/pulls/425"},"html":{"href":"https://github.com/mysociety/writetothem/pull/425"},"issue":{"href":"https://api.github.com/repos/mysociety/writetothem/issues/425"},"comments":{"href":"https://api.github.com/repos/mysociety/writetothem/issues/425/comments"},"review_comments":{"href":"https://api.github.com/repos/mysociety/writetothem/pulls/425/comments"},"review_comment":{"href":"https://api.github.com/repos/mysociety/writetothem/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mysociety/writetothem/pulls/425/commits"},"statuses":{"href":"https://api.github.com/repos/mysociety/writetothem/statuses/7111bfd25f259492756875b3235ecdc356df64c0"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"dracos"}}