{"action":"opened","issue":{"url":"https://api.github.com/repos/mysociety/asktheeu-theme/issues/3","labels_url":"https://api.github.com/repos/mysociety/asktheeu-theme/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/mysociety/asktheeu-theme/issues/3/comments","events_url":"https://api.github.com/repos/mysociety/asktheeu-theme/issues/3/events","html_url":"https://github.com/mysociety/asktheeu-theme/issues/3","id":56658554,"number":3,"title":"Implement link to Baselining Survey","user":{"login":"jacksonj04","id":619082,"avatar_url":"https://avatars.githubusercontent.com/u/619082?v=3","gravatar_id":"","url":"https://api.github.com/users/jacksonj04","html_url":"https://github.com/jacksonj04","followers_url":"https://api.github.com/users/jacksonj04/followers","following_url":"https://api.github.com/users/jacksonj04/following{/other_user}","gists_url":"https://api.github.com/users/jacksonj04/gists{/gist_id}","starred_url":"https://api.github.com/users/jacksonj04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacksonj04/subscriptions","organizations_url":"https://api.github.com/users/jacksonj04/orgs","repos_url":"https://api.github.com/users/jacksonj04/repos","events_url":"https://api.github.com/users/jacksonj04/events{/privacy}","received_events_url":"https://api.github.com/users/jacksonj04/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-05T11:30:46Z","updated_at":"2015-02-05T11:30:46Z","closed_at":null,"body":"Implementation is pretty easy, it’s just a bit of JS and a bit of HTML. If you take a look at https://gist.github.com/jacksonj04/de159da854a4a53d6ad4 you can see the code - the JavaScript should go on every page (since it starts things like time on site tracking), and the HTML snippet wherever you want the link to the survey to appear. The wording of the link can be changed as you want (including using i18n) as long as the `id` and `data-transaction` remain intact, and as long as the surrounding `<div>` remains so the link can only be shown to the right proportion of users.\r\n\r\nOn the subject of data-transaction, this is used to track where in the process people are. On other sites we’ve already implemented the link we've only put it at the end of the reporting process. If you want to put the link in other places (such as after people send a reply) just change the value to something more descriptive.\r\n\r\nAs far as showing translations of the survey, collecting the data and so-on this is all done by SurveyGizmo so there's nothing you need to worry about doing.\r\n\r\nIf you want to tweak the portion of users who see the survey (it's currently 60%), it's the `var e=0.6` right at the beginning of the JavaScript, just change accordingly. The only other bit that might change is `document.getElementById(\"logged_in_bar\")`, which tells the JavaScript which page element to look out for to decide if a user is signed in or not."}}