From de0810ed985c46e72efe4e32dccf806e93b23706 Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Fri, 25 Oct 2013 22:55:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86Google=20tracker=E5=8F=AF=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.default.js | 2 ++ views/layout.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.default.js b/config.default.js index 9507e54ba0..78e9a5adfa 100644 --- a/config.default.js +++ b/config.default.js @@ -15,6 +15,8 @@ exports.config = { '', ], 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=''] ] diff --git a/views/layout.html b/views/layout.html index 87ea26a6c6..c0abb30824 100644 --- a/views/layout.html +++ b/views/layout.html @@ -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');