Skip to content

Commit 958a01f

Browse files
committed
Move ga account setting to new ga setting page
1 parent 58a0017 commit 958a01f

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

app/assets/javascripts/admin/setting/template/website.html

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,6 @@
2424
<textarea class="form-control" rows="4" ng-model="website.sub_title"></textarea>
2525
</div>
2626
</div>
27-
<div class="form-group">
28-
<label class="col-md-1 control-label">GA Account</label>
29-
30-
<div class="col-md-5">
31-
<input type="text" class="form-control" ng-model="website.ga"/>
32-
<span class="help-block">填写以开启
33-
<a href="https://developers.google.com/analytics/resources/concepts/gaConceptsAccounts"
34-
target="_blank">Google
35-
Analytics</a> 统计(如 UA-XXXX-Y)
36-
</span>
37-
</div>
38-
</div>
3927
</fieldset>
4028
<fieldset>
4129
<legend>作者</legend>

app/views/layouts/_ga.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<% if Setting.website.ga and !@preview %>
1+
<% if Setting.ga.account and !@preview %>
22
<% if ga == :head %>
33
<script>
44
var _gaq = _gaq || [];
5-
_gaq.push(['_setAccount', '<%= Setting.website.ga %>']);
5+
_gaq.push(['_setAccount', '<%= Setting.ga.account %>']);
66
(function() {
77
var ga = document.createElement('script');
88
ga.type = 'text/javascript';

0 commit comments

Comments
 (0)