Skip to content

Commit

Permalink
将Google tracker可配置化
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed Oct 25, 2013
1 parent 2a43584 commit de0810e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ exports.config = {
'<meta name="author" content="EDP@TAOBAO" />',
],
host: 'localhost.cnodejs.org',
// 默认的Google tracker ID,自有站点请修改,申请地址:http://www.google.com/analytics/
google_tracker_id: 'UA-41753901-5',
site_logo: '', // default is `name`
site_navs: [
// [ path, title, [target=''] ]
Expand Down
2 changes: 1 addition & 1 deletion views/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-41753901-5', 'cnodejs.org');
ga('create', '<%=config.google_tracker_id%>', '<%= config.host %>');
ga('send', 'pageview');

</script>
Expand Down

0 comments on commit de0810e

Please sign in to comment.