From 60aef1426a73539a40e59c567b1f821e6297afe2 Mon Sep 17 00:00:00 2001 From: manson Date: Mon, 7 Jul 2014 16:18:52 +0800 Subject: [PATCH] Render google analytics --- app/helpers/application_helper.rb | 4 ++++ app/templates/orbit_bootstrap/partial/_head.html.erb | 1 + app/views/admin/import/index.html.erb | 1 + 3 files changed, 6 insertions(+) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f3dacd9..9c1659c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -45,6 +45,10 @@ module ApplicationHelper title end + def render_google_analytics + Site.first.google_analytics.html_safe + end + def render_footer site = Site.first footer_file = File.join('../templates', "#{@key}", "/home/footer.html.erb") diff --git a/app/templates/orbit_bootstrap/partial/_head.html.erb b/app/templates/orbit_bootstrap/partial/_head.html.erb index 27fc3bd..1e13e6b 100644 --- a/app/templates/orbit_bootstrap/partial/_head.html.erb +++ b/app/templates/orbit_bootstrap/partial/_head.html.erb @@ -11,6 +11,7 @@ <%= javascript_include_tag "plugin/jquery.cycle2.min"%> <%= javascript_include_tag "app"%> <%= javascript_include_tag "#{@dataApi}" if @dataApi != nil%> + <%= render_google_analytics %>