{"action":"created","comment":{"url":"https://api.github.com/repos/Financial-Times/n-ui/pulls/comments/76034987","id":76034987,"diff_hunk":"@@ -68,6 +68,15 @@ const oTrackingWrapper = {\n \t\t\tif (segmentId[1]) {\n \t\t\t\tcontext['marketing_segment_id'] = segmentId[1];\n \t\t\t}\n+\t\t\tconst pageMetaEl = document.querySelector('[data-page-meta]');\n+\t\t\tlet pageMeta;\n+\t\t\tif (pageMetaEl) {\n+\t\t\t\ttry {\n+\t\t\t\t\tpageMeta = JSON.parse(pageMetaEl.innerHTML);","path":"tracking/ft/index.js","position":8,"original_position":8,"commit_id":"19f93be21fc94e1859bd4590e3074a8dff1e553b","original_commit_id":"19f93be21fc94e1859bd4590e3074a8dff1e553b","user":{"login":"wheresrhys","id":447559,"avatar_url":"https://avatars.githubusercontent.com/u/447559?v=3","gravatar_id":"","url":"https://api.github.com/users/wheresrhys","html_url":"https://github.com/wheresrhys","followers_url":"https://api.github.com/users/wheresrhys/followers","following_url":"https://api.github.com/users/wheresrhys/following{/other_user}","gists_url":"https://api.github.com/users/wheresrhys/gists{/gist_id}","starred_url":"https://api.github.com/users/wheresrhys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wheresrhys/subscriptions","organizations_url":"https://api.github.com/users/wheresrhys/orgs","repos_url":"https://api.github.com/users/wheresrhys/repos","events_url":"https://api.github.com/users/wheresrhys/events{/privacy}","received_events_url":"https://api.github.com/users/wheresrhys/received_events","type":"User","site_admin":false},"body":"why not make the pageMetaEl a script tag?","created_at":"2016-08-24T10:48:54Z","updated_at":"2016-08-24T10:48:54Z","html_url":"https://github.com/Financial-Times/n-ui/pull/371#discussion_r76034987","pull_request_url":"https://api.github.com/repos/Financial-Times/n-ui/pulls/371","_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/n-ui/pulls/comments/76034987"},"html":{"href":"https://github.com/Financial-Times/n-ui/pull/371#discussion_r76034987"},"pull_request":{"href":"https://api.github.com/repos/Financial-Times/n-ui/pulls/371"}}},"pull_request":{"url":"https://api.github.com/repos/Financial-Times/n-ui/pulls/371","id":82506603,"html_url":"https://github.com/Financial-Times/n-ui/pull/371","diff_url":"https://github.com/Financial-Times/n-ui/pull/371.diff","patch_url":"https://github.com/Financial-Times/n-ui/pull/371.patch","issue_url":"https://api.github.com/repos/Financial-Times/n-ui/issues/371","number":371,"state":"open","locked":false,"title":"Tracking - pick page-meta from document & add to page view context","user":{"login":"andygnewman","id":8938227,"avatar_url":"https://avatars.githubusercontent.com/u/8938227?v=3","gravatar_id":"","url":"https://api.github.com/users/andygnewman","html_url":"https://github.com/andygnewman","followers_url":"https://api.github.com/users/andygnewman/followers","following_url":"https://api.github.com/users/andygnewman/following{/other_user}","gists_url":"https://api.github.com/users/andygnewman/gists{/gist_id}","starred_url":"https://api.github.com/users/andygnewman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andygnewman/subscriptions","organizations_url":"https://api.github.com/users/andygnewman/orgs","repos_url":"https://api.github.com/users/andygnewman/repos","events_url":"https://api.github.com/users/andygnewman/events{/privacy}","received_events_url":"https://api.github.com/users/andygnewman/received_events","type":"User","site_admin":false},"body":"cc: @wheresrhys @adambraimbridge\r\n\r\nGive the capability for apps to render a JSON object into the document tagged with `data-page-meta` that can then be added to the context property of the page view dispatched via oTracking.","created_at":"2016-08-24T09:09:19Z","updated_at":"2016-08-24T10:48:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2a8e685f0b24476888616ea6f4451a071388a0b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/n-ui/pulls/371/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/n-ui/pulls/371/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/n-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Financial-Times/n-ui/issues/371/comments","statuses_url":"https://api.github.com/repos/Financial-Times/n-ui/statuses/19f93be21fc94e1859bd4590e3074a8dff1e553b","head":{"label":"Financial-Times:tracking-page-meta","ref":"tracking-page-meta","sha":"19f93be21fc94e1859bd4590e3074a8dff1e553b","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":56768327,"name":"n-ui","full_name":"Financial-Times/n-ui","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/n-ui","description":"Next's shared client-side code","fork":false,"url":"https://api.github.com/repos/Financial-Times/n-ui","forks_url":"https://api.github.com/repos/Financial-Times/n-ui/forks","keys_url":"https://api.github.com/repos/Financial-Times/n-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/n-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/n-ui/teams","hooks_url":"https://api.github.com/repos/Financial-Times/n-ui/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/n-ui/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/n-ui/events","assignees_url":"https://api.github.com/repos/Financial-Times/n-ui/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/n-ui/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/n-ui/tags","blobs_url":"https://api.github.com/repos/Financial-Times/n-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/n-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/n-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/n-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/n-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/n-ui/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/n-ui/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/n-ui/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/n-ui/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/n-ui/subscription","commits_url":"https://api.github.com/repos/Financial-Times/n-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/n-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/n-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/n-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/n-ui/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/n-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/n-ui/merges","archive_url":"https://api.github.com/repos/Financial-Times/n-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/n-ui/downloads","issues_url":"https://api.github.com/repos/Financial-Times/n-ui/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/n-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/n-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/n-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/n-ui/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/n-ui/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/n-ui/deployments","created_at":"2016-04-21T11:30:29Z","updated_at":"2016-08-10T13:37:37Z","pushed_at":"2016-08-24T10:38:34Z","git_url":"git://github.com/Financial-Times/n-ui.git","ssh_url":"git@github.com:Financial-Times/n-ui.git","clone_url":"https://github.com/Financial-Times/n-ui.git","svn_url":"https://github.com/Financial-Times/n-ui","homepage":"https://github.com/Financial-Times/n-ui/wiki","size":964,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":1,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"7f52b384acca3472c73e25b63e59fd0ee70f1b25","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":56768327,"name":"n-ui","full_name":"Financial-Times/n-ui","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/n-ui","description":"Next's shared client-side code","fork":false,"url":"https://api.github.com/repos/Financial-Times/n-ui","forks_url":"https://api.github.com/repos/Financial-Times/n-ui/forks","keys_url":"https://api.github.com/repos/Financial-Times/n-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/n-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/n-ui/teams","hooks_url":"https://api.github.com/repos/Financial-Times/n-ui/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/n-ui/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/n-ui/events","assignees_url":"https://api.github.com/repos/Financial-Times/n-ui/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/n-ui/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/n-ui/tags","blobs_url":"https://api.github.com/repos/Financial-Times/n-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/n-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/n-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/n-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/n-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/n-ui/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/n-ui/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/n-ui/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/n-ui/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/n-ui/subscription","commits_url":"https://api.github.com/repos/Financial-Times/n-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/n-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/n-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/n-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/n-ui/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/n-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/n-ui/merges","archive_url":"https://api.github.com/repos/Financial-Times/n-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/n-ui/downloads","issues_url":"https://api.github.com/repos/Financial-Times/n-ui/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/n-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/n-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/n-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/n-ui/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/n-ui/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/n-ui/deployments","created_at":"2016-04-21T11:30:29Z","updated_at":"2016-08-10T13:37:37Z","pushed_at":"2016-08-24T10:38:34Z","git_url":"git://github.com/Financial-Times/n-ui.git","ssh_url":"git@github.com:Financial-Times/n-ui.git","clone_url":"https://github.com/Financial-Times/n-ui.git","svn_url":"https://github.com/Financial-Times/n-ui","homepage":"https://github.com/Financial-Times/n-ui/wiki","size":964,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/n-ui/pulls/371"},"html":{"href":"https://github.com/Financial-Times/n-ui/pull/371"},"issue":{"href":"https://api.github.com/repos/Financial-Times/n-ui/issues/371"},"comments":{"href":"https://api.github.com/repos/Financial-Times/n-ui/issues/371/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/n-ui/pulls/371/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/n-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/n-ui/pulls/371/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/n-ui/statuses/19f93be21fc94e1859bd4590e3074a8dff1e553b"}}}}
{"actor":{"display_login":"wheresrhys"}}