{"action":"created","comment":{"url":"https://api.github.com/repos/vigetlabs/trackomatic/pulls/comments/40466978","id":40466978,"diff_hunk":"@@ -0,0 +1,84 @@\n+/**\n+ * @license Copyright 2015 Viget Labs\n+ * Trackomatic.js Automatic Google Analytics Tracking Version 0.1\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the 'License');\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *  http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an 'AS IS' BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+const ready   = require('./ready')\n+const plugins = require('./plugins')\n+const config  = require('./config')\n+const util    = require('./util')\n+\n+/**\n+ * @constructor\n+ * @param {object} tracker - Passed in by GA\n+ * @param {object} options - Trackomatic configuration object\n+ */\n+class Trackomatic {\n+  constructor(tracker, options={}) {\n+    window._trackomatic = window._trackomatic || this\n+\n+    this.util    = util\n+    this.config  = config\n+    this.tracker = tracker\n+    this.options = { ...config.DEFAULTS, ...options }\n+\n+    ready(this.boot.bind(this))\n+  }\n+\n+  boot() {\n+    console.log(","path":"src/trackomatic.js","position":41,"original_position":41,"commit_id":"964a939d9d042236d1c12639a279c47a20f30c86","original_commit_id":"964a939d9d042236d1c12639a279c47a20f30c86","user":{"login":"solomonhawk","id":1037707,"avatar_url":"https://avatars.githubusercontent.com/u/1037707?v=3","gravatar_id":"","url":"https://api.github.com/users/solomonhawk","html_url":"https://github.com/solomonhawk","followers_url":"https://api.github.com/users/solomonhawk/followers","following_url":"https://api.github.com/users/solomonhawk/following{/other_user}","gists_url":"https://api.github.com/users/solomonhawk/gists{/gist_id}","starred_url":"https://api.github.com/users/solomonhawk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solomonhawk/subscriptions","organizations_url":"https://api.github.com/users/solomonhawk/orgs","repos_url":"https://api.github.com/users/solomonhawk/repos","events_url":"https://api.github.com/users/solomonhawk/events{/privacy}","received_events_url":"https://api.github.com/users/solomonhawk/received_events","type":"User","site_admin":false},"body":"On the existing trackomatic this just gets fired regardless. Anyone have feels?","created_at":"2015-09-25T19:28:51Z","updated_at":"2015-09-25T19:28:51Z","html_url":"https://github.com/vigetlabs/trackomatic/pull/22#discussion_r40466978","pull_request_url":"https://api.github.com/repos/vigetlabs/trackomatic/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/vigetlabs/trackomatic/pulls/comments/40466978"},"html":{"href":"https://github.com/vigetlabs/trackomatic/pull/22#discussion_r40466978"},"pull_request":{"href":"https://api.github.com/repos/vigetlabs/trackomatic/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/vigetlabs/trackomatic/pulls/22","id":45802497,"html_url":"https://github.com/vigetlabs/trackomatic/pull/22","diff_url":"https://github.com/vigetlabs/trackomatic/pull/22.diff","patch_url":"https://github.com/vigetlabs/trackomatic/pull/22.patch","issue_url":"https://api.github.com/repos/vigetlabs/trackomatic/issues/22","number":22,"state":"open","locked":false,"title":"Refactor","user":{"login":"solomonhawk","id":1037707,"avatar_url":"https://avatars.githubusercontent.com/u/1037707?v=3","gravatar_id":"","url":"https://api.github.com/users/solomonhawk","html_url":"https://github.com/solomonhawk","followers_url":"https://api.github.com/users/solomonhawk/followers","following_url":"https://api.github.com/users/solomonhawk/following{/other_user}","gists_url":"https://api.github.com/users/solomonhawk/gists{/gist_id}","starred_url":"https://api.github.com/users/solomonhawk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solomonhawk/subscriptions","organizations_url":"https://api.github.com/users/solomonhawk/orgs","repos_url":"https://api.github.com/users/solomonhawk/repos","events_url":"https://api.github.com/users/solomonhawk/events{/privacy}","received_events_url":"https://api.github.com/users/solomonhawk/received_events","type":"User","site_admin":false},"body":"Modulez, build, architecture, buzz words.\r\n\r\nNext TODO: Add tests.\r\n\r\nI'm imagining a world in which we split up the trackomatic plugins into their own modules in order to make maintaining them easier which is part of the reason why I've opted to pass in the trackomatic instance to plugins who then access it's util methods, etc. as opposed to importing the util object into the plugin file itself.\r\n\r\nIf you have any sort of questions or thoughts at all please leave them here for discussion.\r\n\r\nThanks!","created_at":"2015-09-23T16:44:29Z","updated_at":"2015-09-25T19:28:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vigetlabs/trackomatic/pulls/22/commits","review_comments_url":"https://api.github.com/repos/vigetlabs/trackomatic/pulls/22/comments","review_comment_url":"https://api.github.com/repos/vigetlabs/trackomatic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vigetlabs/trackomatic/issues/22/comments","statuses_url":"https://api.github.com/repos/vigetlabs/trackomatic/statuses/964a939d9d042236d1c12639a279c47a20f30c86","head":{"label":"vigetlabs:sfh-refactor","ref":"sfh-refactor","sha":"964a939d9d042236d1c12639a279c47a20f30c86","user":{"login":"vigetlabs","id":4845,"avatar_url":"https://avatars.githubusercontent.com/u/4845?v=3","gravatar_id":"","url":"https://api.github.com/users/vigetlabs","html_url":"https://github.com/vigetlabs","followers_url":"https://api.github.com/users/vigetlabs/followers","following_url":"https://api.github.com/users/vigetlabs/following{/other_user}","gists_url":"https://api.github.com/users/vigetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/vigetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vigetlabs/subscriptions","organizations_url":"https://api.github.com/users/vigetlabs/orgs","repos_url":"https://api.github.com/users/vigetlabs/repos","events_url":"https://api.github.com/users/vigetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/vigetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":35495097,"name":"trackomatic","full_name":"vigetlabs/trackomatic","owner":{"login":"vigetlabs","id":4845,"avatar_url":"https://avatars.githubusercontent.com/u/4845?v=3","gravatar_id":"","url":"https://api.github.com/users/vigetlabs","html_url":"https://github.com/vigetlabs","followers_url":"https://api.github.com/users/vigetlabs/followers","following_url":"https://api.github.com/users/vigetlabs/following{/other_user}","gists_url":"https://api.github.com/users/vigetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/vigetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vigetlabs/subscriptions","organizations_url":"https://api.github.com/users/vigetlabs/orgs","repos_url":"https://api.github.com/users/vigetlabs/repos","events_url":"https://api.github.com/users/vigetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/vigetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vigetlabs/trackomatic","description":"Automatic Google Analytics tracking","fork":false,"url":"https://api.github.com/repos/vigetlabs/trackomatic","forks_url":"https://api.github.com/repos/vigetlabs/trackomatic/forks","keys_url":"https://api.github.com/repos/vigetlabs/trackomatic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vigetlabs/trackomatic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vigetlabs/trackomatic/teams","hooks_url":"https://api.github.com/repos/vigetlabs/trackomatic/hooks","issue_events_url":"https://api.github.com/repos/vigetlabs/trackomatic/issues/events{/number}","events_url":"https://api.github.com/repos/vigetlabs/trackomatic/events","assignees_url":"https://api.github.com/repos/vigetlabs/trackomatic/assignees{/user}","branches_url":"https://api.github.com/repos/vigetlabs/trackomatic/branches{/branch}","tags_url":"https://api.github.com/repos/vigetlabs/trackomatic/tags","blobs_url":"https://api.github.com/repos/vigetlabs/trackomatic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vigetlabs/trackomatic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vigetlabs/trackomatic/git/refs{/sha}","trees_url":"https://api.github.com/repos/vigetlabs/trackomatic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vigetlabs/trackomatic/statuses/{sha}","languages_url":"https://api.github.com/repos/vigetlabs/trackomatic/languages","stargazers_url":"https://api.github.com/repos/vigetlabs/trackomatic/stargazers","contributors_url":"https://api.github.com/repos/vigetlabs/trackomatic/contributors","subscribers_url":"https://api.github.com/repos/vigetlabs/trackomatic/subscribers","subscription_url":"https://api.github.com/repos/vigetlabs/trackomatic/subscription","commits_url":"https://api.github.com/repos/vigetlabs/trackomatic/commits{/sha}","git_commits_url":"https://api.github.com/repos/vigetlabs/trackomatic/git/commits{/sha}","comments_url":"https://api.github.com/repos/vigetlabs/trackomatic/comments{/number}","issue_comment_url":"https://api.github.com/repos/vigetlabs/trackomatic/issues/comments{/number}","contents_url":"https://api.github.com/repos/vigetlabs/trackomatic/contents/{+path}","compare_url":"https://api.github.com/repos/vigetlabs/trackomatic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vigetlabs/trackomatic/merges","archive_url":"https://api.github.com/repos/vigetlabs/trackomatic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vigetlabs/trackomatic/downloads","issues_url":"https://api.github.com/repos/vigetlabs/trackomatic/issues{/number}","pulls_url":"https://api.github.com/repos/vigetlabs/trackomatic/pulls{/number}","milestones_url":"https://api.github.com/repos/vigetlabs/trackomatic/milestones{/number}","notifications_url":"https://api.github.com/repos/vigetlabs/trackomatic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vigetlabs/trackomatic/labels{/name}","releases_url":"https://api.github.com/repos/vigetlabs/trackomatic/releases{/id}","created_at":"2015-05-12T15:04:23Z","updated_at":"2015-09-13T10:32:21Z","pushed_at":"2015-09-23T17:12:00Z","git_url":"git://github.com/vigetlabs/trackomatic.git","ssh_url":"git@github.com:vigetlabs/trackomatic.git","clone_url":"https://github.com/vigetlabs/trackomatic.git","svn_url":"https://github.com/vigetlabs/trackomatic","homepage":null,"size":306,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":14,"forks":2,"open_issues":14,"watchers":9,"default_branch":"master"}},"base":{"label":"vigetlabs:master","ref":"master","sha":"9c68faef0e181311b18c769b58d57f25eb7e1604","user":{"login":"vigetlabs","id":4845,"avatar_url":"https://avatars.githubusercontent.com/u/4845?v=3","gravatar_id":"","url":"https://api.github.com/users/vigetlabs","html_url":"https://github.com/vigetlabs","followers_url":"https://api.github.com/users/vigetlabs/followers","following_url":"https://api.github.com/users/vigetlabs/following{/other_user}","gists_url":"https://api.github.com/users/vigetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/vigetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vigetlabs/subscriptions","organizations_url":"https://api.github.com/users/vigetlabs/orgs","repos_url":"https://api.github.com/users/vigetlabs/repos","events_url":"https://api.github.com/users/vigetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/vigetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":35495097,"name":"trackomatic","full_name":"vigetlabs/trackomatic","owner":{"login":"vigetlabs","id":4845,"avatar_url":"https://avatars.githubusercontent.com/u/4845?v=3","gravatar_id":"","url":"https://api.github.com/users/vigetlabs","html_url":"https://github.com/vigetlabs","followers_url":"https://api.github.com/users/vigetlabs/followers","following_url":"https://api.github.com/users/vigetlabs/following{/other_user}","gists_url":"https://api.github.com/users/vigetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/vigetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vigetlabs/subscriptions","organizations_url":"https://api.github.com/users/vigetlabs/orgs","repos_url":"https://api.github.com/users/vigetlabs/repos","events_url":"https://api.github.com/users/vigetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/vigetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vigetlabs/trackomatic","description":"Automatic Google Analytics tracking","fork":false,"url":"https://api.github.com/repos/vigetlabs/trackomatic","forks_url":"https://api.github.com/repos/vigetlabs/trackomatic/forks","keys_url":"https://api.github.com/repos/vigetlabs/trackomatic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vigetlabs/trackomatic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vigetlabs/trackomatic/teams","hooks_url":"https://api.github.com/repos/vigetlabs/trackomatic/hooks","issue_events_url":"https://api.github.com/repos/vigetlabs/trackomatic/issues/events{/number}","events_url":"https://api.github.com/repos/vigetlabs/trackomatic/events","assignees_url":"https://api.github.com/repos/vigetlabs/trackomatic/assignees{/user}","branches_url":"https://api.github.com/repos/vigetlabs/trackomatic/branches{/branch}","tags_url":"https://api.github.com/repos/vigetlabs/trackomatic/tags","blobs_url":"https://api.github.com/repos/vigetlabs/trackomatic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vigetlabs/trackomatic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vigetlabs/trackomatic/git/refs{/sha}","trees_url":"https://api.github.com/repos/vigetlabs/trackomatic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vigetlabs/trackomatic/statuses/{sha}","languages_url":"https://api.github.com/repos/vigetlabs/trackomatic/languages","stargazers_url":"https://api.github.com/repos/vigetlabs/trackomatic/stargazers","contributors_url":"https://api.github.com/repos/vigetlabs/trackomatic/contributors","subscribers_url":"https://api.github.com/repos/vigetlabs/trackomatic/subscribers","subscription_url":"https://api.github.com/repos/vigetlabs/trackomatic/subscription","commits_url":"https://api.github.com/repos/vigetlabs/trackomatic/commits{/sha}","git_commits_url":"https://api.github.com/repos/vigetlabs/trackomatic/git/commits{/sha}","comments_url":"https://api.github.com/repos/vigetlabs/trackomatic/comments{/number}","issue_comment_url":"https://api.github.com/repos/vigetlabs/trackomatic/issues/comments{/number}","contents_url":"https://api.github.com/repos/vigetlabs/trackomatic/contents/{+path}","compare_url":"https://api.github.com/repos/vigetlabs/trackomatic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vigetlabs/trackomatic/merges","archive_url":"https://api.github.com/repos/vigetlabs/trackomatic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vigetlabs/trackomatic/downloads","issues_url":"https://api.github.com/repos/vigetlabs/trackomatic/issues{/number}","pulls_url":"https://api.github.com/repos/vigetlabs/trackomatic/pulls{/number}","milestones_url":"https://api.github.com/repos/vigetlabs/trackomatic/milestones{/number}","notifications_url":"https://api.github.com/repos/vigetlabs/trackomatic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vigetlabs/trackomatic/labels{/name}","releases_url":"https://api.github.com/repos/vigetlabs/trackomatic/releases{/id}","created_at":"2015-05-12T15:04:23Z","updated_at":"2015-09-13T10:32:21Z","pushed_at":"2015-09-23T17:12:00Z","git_url":"git://github.com/vigetlabs/trackomatic.git","ssh_url":"git@github.com:vigetlabs/trackomatic.git","clone_url":"https://github.com/vigetlabs/trackomatic.git","svn_url":"https://github.com/vigetlabs/trackomatic","homepage":null,"size":306,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":14,"forks":2,"open_issues":14,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vigetlabs/trackomatic/pulls/22"},"html":{"href":"https://github.com/vigetlabs/trackomatic/pull/22"},"issue":{"href":"https://api.github.com/repos/vigetlabs/trackomatic/issues/22"},"comments":{"href":"https://api.github.com/repos/vigetlabs/trackomatic/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/vigetlabs/trackomatic/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/vigetlabs/trackomatic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vigetlabs/trackomatic/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/vigetlabs/trackomatic/statuses/964a939d9d042236d1c12639a279c47a20f30c86"}}}}