google analytics 参数化
This commit is contained in:
parent
539f3dd5f3
commit
26e97749d2
|
@ -0,0 +1,11 @@
|
|||
- if ENV['GOOGLE']
|
||||
javascript:
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', '#{ENV['GOOGLE']}']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
|
@ -35,16 +35,3 @@ html
|
|||
.admin-main-field ng-app="app"
|
||||
= yield
|
||||
= render "layouts/footer"
|
||||
|
||||
|
||||
|
||||
javascript:
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-32883596-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
|
|
@ -7,7 +7,6 @@ html
|
|||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "vendor/modernizr"
|
||||
= javascript_include_tag "application"
|
||||
= yield :js
|
||||
= csrf_meta_tags
|
||||
body
|
||||
.off-canvas-wrap
|
||||
|
@ -56,15 +55,4 @@ html
|
|||
= render "layouts/footer"
|
||||
a.exit-off-canvas
|
||||
|
||||
|
||||
|
||||
javascript:
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-32883596-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
= render 'layouts/google_analytics'
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# Add application configuration variables here, as shown below.
|
||||
|
||||
# 后台登录的用户名与密码, 不填的话无法管理后台
|
||||
ADMIN_USER: 'admin'
|
||||
ADMIN_PASSWORD: 'admin'
|
||||
|
||||
# google analytics, 如果不需要可以留空
|
||||
GOOGLE: 'UA-32883596-1'
|
Loading…
Reference in New Issue