{"action":"created","comment":{"url":"https://api.github.com/repos/ecomfe/er-track/pulls/comments/25756359","id":25756359,"diff_hunk":"@@ -0,0 +1,85 @@\n+/**\n+ * ER-Track\n+ * Copyright 2013 Baidu Inc. All rights reserved.\n+ *\n+ * @file 服务器统计追踪器\n+ * @author otakustay, dddbear\n+ */\n+define(\n+    function (require) {\n+        var u = require('underscore');\n+        var moment = require('moment');\n+\n+        var exports = {};\n+\n+        /**\n+         * @override\n+         */\n+        exports.constructor = function (destinyUrl) {\n+            this.$super(arguments);\n+            this.destinyUrl = destinyUrl || 'http://adm.baidu.com/gen_204';\n+        };\n+\n+        /**\n+         * @override\n+         */\n+        exports.display = function (data) {\n+            data.url = location.hash.replace(/^#/, '');\n+            data.time = moment().format('YYYY-MM-DD HH:mm:ss');\n+            // require('er/ajax').log(this.destinyUrl, data);\n+        };\n+\n+        /**\n+         * @override\n+         */\n+        exports.trackPageView = function (context) {\n+            var referrer = context.referrer || document.referrer;\n+            var data = {\n+                type: 'route',\n+                from: referrer === '' ? '二次元' : referrer,","path":"src/trackers/Log.js","position":39,"original_position":39,"commit_id":"8fed2b9f52fbd00e0497d07a90e665a5556c3f56","original_commit_id":"8fed2b9f52fbd00e0497d07a90e665a5556c3f56","user":{"login":"DDDBear","id":1559953,"avatar_url":"https://avatars.githubusercontent.com/u/1559953?v=3","gravatar_id":"","url":"https://api.github.com/users/DDDBear","html_url":"https://github.com/DDDBear","followers_url":"https://api.github.com/users/DDDBear/followers","following_url":"https://api.github.com/users/DDDBear/following{/other_user}","gists_url":"https://api.github.com/users/DDDBear/gists{/gist_id}","starred_url":"https://api.github.com/users/DDDBear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDDBear/subscriptions","organizations_url":"https://api.github.com/users/DDDBear/orgs","repos_url":"https://api.github.com/users/DDDBear/repos","events_url":"https://api.github.com/users/DDDBear/events{/privacy}","received_events_url":"https://api.github.com/users/DDDBear/received_events","type":"User","site_admin":false},"body":"发往服务器的数据格式这个我还没太想好，不过也考虑了分析的方面，觉着key是解析的关键。比如根据什么type，读取什么数据。这个有啥具体的改进建议么？","created_at":"2015-03-04T07:24:51Z","updated_at":"2015-03-04T07:24:51Z","html_url":"https://github.com/ecomfe/er-track/pull/4#discussion_r25756359","pull_request_url":"https://api.github.com/repos/ecomfe/er-track/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/ecomfe/er-track/pulls/comments/25756359"},"html":{"href":"https://github.com/ecomfe/er-track/pull/4#discussion_r25756359"},"pull_request":{"href":"https://api.github.com/repos/ecomfe/er-track/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/ecomfe/er-track/pulls/4","id":30442426,"html_url":"https://github.com/ecomfe/er-track/pull/4","diff_url":"https://github.com/ecomfe/er-track/pull/4.diff","patch_url":"https://github.com/ecomfe/er-track/pull/4.patch","issue_url":"https://api.github.com/repos/ecomfe/er-track/issues/4","number":4,"state":"open","locked":false,"title":"er-track改版","user":{"login":"DDDBear","id":1559953,"avatar_url":"https://avatars.githubusercontent.com/u/1559953?v=3","gravatar_id":"","url":"https://api.github.com/users/DDDBear","html_url":"https://github.com/DDDBear","followers_url":"https://api.github.com/users/DDDBear/followers","following_url":"https://api.github.com/users/DDDBear/following{/other_user}","gists_url":"https://api.github.com/users/DDDBear/gists{/gist_id}","starred_url":"https://api.github.com/users/DDDBear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDDBear/subscriptions","organizations_url":"https://api.github.com/users/DDDBear/orgs","repos_url":"https://api.github.com/users/DDDBear/repos","events_url":"https://api.github.com/users/DDDBear/events{/privacy}","received_events_url":"https://api.github.com/users/DDDBear/received_events","type":"User","site_admin":false},"body":"er-track改版\r\n\r\n1. 支持从“追踪内容”到“显示方式”的多角度扩展\r\n2. 支持ioc注入\r\n3. 针对异常区分职责，增加ajax错误跟踪\r\n4. 增加通用错误跟踪\r\n","created_at":"2015-03-04T06:56:39Z","updated_at":"2015-03-04T07:24:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1149279b091cacbe28ac0959fa6e3ab4675a0913","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ecomfe/er-track/pulls/4/commits","review_comments_url":"https://api.github.com/repos/ecomfe/er-track/pulls/4/comments","review_comment_url":"https://api.github.com/repos/ecomfe/er-track/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ecomfe/er-track/issues/4/comments","statuses_url":"https://api.github.com/repos/ecomfe/er-track/statuses/8fed2b9f52fbd00e0497d07a90e665a5556c3f56","head":{"label":"DDDBear:dev","ref":"dev","sha":"8fed2b9f52fbd00e0497d07a90e665a5556c3f56","user":{"login":"DDDBear","id":1559953,"avatar_url":"https://avatars.githubusercontent.com/u/1559953?v=3","gravatar_id":"","url":"https://api.github.com/users/DDDBear","html_url":"https://github.com/DDDBear","followers_url":"https://api.github.com/users/DDDBear/followers","following_url":"https://api.github.com/users/DDDBear/following{/other_user}","gists_url":"https://api.github.com/users/DDDBear/gists{/gist_id}","starred_url":"https://api.github.com/users/DDDBear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDDBear/subscriptions","organizations_url":"https://api.github.com/users/DDDBear/orgs","repos_url":"https://api.github.com/users/DDDBear/repos","events_url":"https://api.github.com/users/DDDBear/events{/privacy}","received_events_url":"https://api.github.com/users/DDDBear/received_events","type":"User","site_admin":false},"repo":{"id":31642529,"name":"er-track","full_name":"DDDBear/er-track","owner":{"login":"DDDBear","id":1559953,"avatar_url":"https://avatars.githubusercontent.com/u/1559953?v=3","gravatar_id":"","url":"https://api.github.com/users/DDDBear","html_url":"https://github.com/DDDBear","followers_url":"https://api.github.com/users/DDDBear/followers","following_url":"https://api.github.com/users/DDDBear/following{/other_user}","gists_url":"https://api.github.com/users/DDDBear/gists{/gist_id}","starred_url":"https://api.github.com/users/DDDBear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDDBear/subscriptions","organizations_url":"https://api.github.com/users/DDDBear/orgs","repos_url":"https://api.github.com/users/DDDBear/repos","events_url":"https://api.github.com/users/DDDBear/events{/privacy}","received_events_url":"https://api.github.com/users/DDDBear/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DDDBear/er-track","description":"Pageview tracking kit for er framework","fork":true,"url":"https://api.github.com/repos/DDDBear/er-track","forks_url":"https://api.github.com/repos/DDDBear/er-track/forks","keys_url":"https://api.github.com/repos/DDDBear/er-track/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DDDBear/er-track/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DDDBear/er-track/teams","hooks_url":"https://api.github.com/repos/DDDBear/er-track/hooks","issue_events_url":"https://api.github.com/repos/DDDBear/er-track/issues/events{/number}","events_url":"https://api.github.com/repos/DDDBear/er-track/events","assignees_url":"https://api.github.com/repos/DDDBear/er-track/assignees{/user}","branches_url":"https://api.github.com/repos/DDDBear/er-track/branches{/branch}","tags_url":"https://api.github.com/repos/DDDBear/er-track/tags","blobs_url":"https://api.github.com/repos/DDDBear/er-track/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DDDBear/er-track/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DDDBear/er-track/git/refs{/sha}","trees_url":"https://api.github.com/repos/DDDBear/er-track/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DDDBear/er-track/statuses/{sha}","languages_url":"https://api.github.com/repos/DDDBear/er-track/languages","stargazers_url":"https://api.github.com/repos/DDDBear/er-track/stargazers","contributors_url":"https://api.github.com/repos/DDDBear/er-track/contributors","subscribers_url":"https://api.github.com/repos/DDDBear/er-track/subscribers","subscription_url":"https://api.github.com/repos/DDDBear/er-track/subscription","commits_url":"https://api.github.com/repos/DDDBear/er-track/commits{/sha}","git_commits_url":"https://api.github.com/repos/DDDBear/er-track/git/commits{/sha}","comments_url":"https://api.github.com/repos/DDDBear/er-track/comments{/number}","issue_comment_url":"https://api.github.com/repos/DDDBear/er-track/issues/comments{/number}","contents_url":"https://api.github.com/repos/DDDBear/er-track/contents/{+path}","compare_url":"https://api.github.com/repos/DDDBear/er-track/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DDDBear/er-track/merges","archive_url":"https://api.github.com/repos/DDDBear/er-track/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DDDBear/er-track/downloads","issues_url":"https://api.github.com/repos/DDDBear/er-track/issues{/number}","pulls_url":"https://api.github.com/repos/DDDBear/er-track/pulls{/number}","milestones_url":"https://api.github.com/repos/DDDBear/er-track/milestones{/number}","notifications_url":"https://api.github.com/repos/DDDBear/er-track/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DDDBear/er-track/labels{/name}","releases_url":"https://api.github.com/repos/DDDBear/er-track/releases{/id}","created_at":"2015-03-04T06:47:27Z","updated_at":"2015-03-04T06:47:28Z","pushed_at":"2015-03-04T06:52:23Z","git_url":"git://github.com/DDDBear/er-track.git","ssh_url":"git@github.com:DDDBear/er-track.git","clone_url":"https://github.com/DDDBear/er-track.git","svn_url":"https://github.com/DDDBear/er-track","homepage":null,"size":92,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ecomfe:master","ref":"master","sha":"eddf8e5d78a7396ae246721b6195403bf28558c0","user":{"login":"ecomfe","id":2268460,"avatar_url":"https://avatars.githubusercontent.com/u/2268460?v=3","gravatar_id":"","url":"https://api.github.com/users/ecomfe","html_url":"https://github.com/ecomfe","followers_url":"https://api.github.com/users/ecomfe/followers","following_url":"https://api.github.com/users/ecomfe/following{/other_user}","gists_url":"https://api.github.com/users/ecomfe/gists{/gist_id}","starred_url":"https://api.github.com/users/ecomfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecomfe/subscriptions","organizations_url":"https://api.github.com/users/ecomfe/orgs","repos_url":"https://api.github.com/users/ecomfe/repos","events_url":"https://api.github.com/users/ecomfe/events{/privacy}","received_events_url":"https://api.github.com/users/ecomfe/received_events","type":"Organization","site_admin":false},"repo":{"id":14545785,"name":"er-track","full_name":"ecomfe/er-track","owner":{"login":"ecomfe","id":2268460,"avatar_url":"https://avatars.githubusercontent.com/u/2268460?v=3","gravatar_id":"","url":"https://api.github.com/users/ecomfe","html_url":"https://github.com/ecomfe","followers_url":"https://api.github.com/users/ecomfe/followers","following_url":"https://api.github.com/users/ecomfe/following{/other_user}","gists_url":"https://api.github.com/users/ecomfe/gists{/gist_id}","starred_url":"https://api.github.com/users/ecomfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecomfe/subscriptions","organizations_url":"https://api.github.com/users/ecomfe/orgs","repos_url":"https://api.github.com/users/ecomfe/repos","events_url":"https://api.github.com/users/ecomfe/events{/privacy}","received_events_url":"https://api.github.com/users/ecomfe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ecomfe/er-track","description":"Pageview tracking kit for er framework","fork":false,"url":"https://api.github.com/repos/ecomfe/er-track","forks_url":"https://api.github.com/repos/ecomfe/er-track/forks","keys_url":"https://api.github.com/repos/ecomfe/er-track/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ecomfe/er-track/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ecomfe/er-track/teams","hooks_url":"https://api.github.com/repos/ecomfe/er-track/hooks","issue_events_url":"https://api.github.com/repos/ecomfe/er-track/issues/events{/number}","events_url":"https://api.github.com/repos/ecomfe/er-track/events","assignees_url":"https://api.github.com/repos/ecomfe/er-track/assignees{/user}","branches_url":"https://api.github.com/repos/ecomfe/er-track/branches{/branch}","tags_url":"https://api.github.com/repos/ecomfe/er-track/tags","blobs_url":"https://api.github.com/repos/ecomfe/er-track/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ecomfe/er-track/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ecomfe/er-track/git/refs{/sha}","trees_url":"https://api.github.com/repos/ecomfe/er-track/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ecomfe/er-track/statuses/{sha}","languages_url":"https://api.github.com/repos/ecomfe/er-track/languages","stargazers_url":"https://api.github.com/repos/ecomfe/er-track/stargazers","contributors_url":"https://api.github.com/repos/ecomfe/er-track/contributors","subscribers_url":"https://api.github.com/repos/ecomfe/er-track/subscribers","subscription_url":"https://api.github.com/repos/ecomfe/er-track/subscription","commits_url":"https://api.github.com/repos/ecomfe/er-track/commits{/sha}","git_commits_url":"https://api.github.com/repos/ecomfe/er-track/git/commits{/sha}","comments_url":"https://api.github.com/repos/ecomfe/er-track/comments{/number}","issue_comment_url":"https://api.github.com/repos/ecomfe/er-track/issues/comments{/number}","contents_url":"https://api.github.com/repos/ecomfe/er-track/contents/{+path}","compare_url":"https://api.github.com/repos/ecomfe/er-track/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ecomfe/er-track/merges","archive_url":"https://api.github.com/repos/ecomfe/er-track/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ecomfe/er-track/downloads","issues_url":"https://api.github.com/repos/ecomfe/er-track/issues{/number}","pulls_url":"https://api.github.com/repos/ecomfe/er-track/pulls{/number}","milestones_url":"https://api.github.com/repos/ecomfe/er-track/milestones{/number}","notifications_url":"https://api.github.com/repos/ecomfe/er-track/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ecomfe/er-track/labels{/name}","releases_url":"https://api.github.com/repos/ecomfe/er-track/releases{/id}","created_at":"2013-11-20T03:34:11Z","updated_at":"2014-08-14T00:57:07Z","pushed_at":"2014-08-14T00:57:06Z","git_url":"git://github.com/ecomfe/er-track.git","ssh_url":"git@github.com:ecomfe/er-track.git","clone_url":"https://github.com/ecomfe/er-track.git","svn_url":"https://github.com/ecomfe/er-track","homepage":null,"size":191,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ecomfe/er-track/pulls/4"},"html":{"href":"https://github.com/ecomfe/er-track/pull/4"},"issue":{"href":"https://api.github.com/repos/ecomfe/er-track/issues/4"},"comments":{"href":"https://api.github.com/repos/ecomfe/er-track/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/ecomfe/er-track/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/ecomfe/er-track/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ecomfe/er-track/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/ecomfe/er-track/statuses/8fed2b9f52fbd00e0497d07a90e665a5556c3f56"}}}}