Commit 3ca4061933fa7430b2c40dd115772808a0ebfe6d
Committed by
gtaaas
1 parent
c02e9564
Exists in
master
and in
1 other branch
Adiciona código do Google Analytics
Showing
3 changed files
with
34 additions
and
15 deletions
Show diff stats
app/views/layouts/admin.html.erb
| 1 | -<!-- | ||
| 2 | -# | ||
| 3 | -# Author Igor Amorim - www.igoramorim.com | ||
| 4 | -# | ||
| 5 | ---> | ||
| 6 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
| 7 | <html> | 2 | <html> |
| 8 | <head> | 3 | <head> |
| @@ -10,6 +5,18 @@ | @@ -10,6 +5,18 @@ | ||
| 10 | <%= stylesheet_link_tag "application", :media => "all" %> | 5 | <%= stylesheet_link_tag "application", :media => "all" %> |
| 11 | <%= javascript_include_tag "application" %> | 6 | <%= javascript_include_tag "application" %> |
| 12 | <%= csrf_meta_tags %> | 7 | <%= csrf_meta_tags %> |
| 8 | + <% if Rails.env.production? %> | ||
| 9 | + <script> | ||
| 10 | + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
| 11 | + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
| 12 | + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
| 13 | + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | ||
| 14 | + | ||
| 15 | + ga('create', 'UA-22403694-4', 'ufpb.br'); | ||
| 16 | + ga('send', 'pageview'); | ||
| 17 | + </script> | ||
| 18 | + <% end %> | ||
| 19 | + | ||
| 13 | </head> | 20 | </head> |
| 14 | <body> | 21 | <body> |
| 15 | <div class="navbar navbar-fixed-top"> | 22 | <div class="navbar navbar-fixed-top"> |
app/views/layouts/application.html.erb
| 1 | -<!-- | ||
| 2 | -# | ||
| 3 | -# Author Igor Amorim - www.igoramorim.com | ||
| 4 | -# | ||
| 5 | ---> | ||
| 6 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
| 7 | <html> | 2 | <html> |
| 8 | <head> | 3 | <head> |
| @@ -10,6 +5,17 @@ | @@ -10,6 +5,17 @@ | ||
| 10 | <%= stylesheet_link_tag "application", :media => "all" %> | 5 | <%= stylesheet_link_tag "application", :media => "all" %> |
| 11 | <%= javascript_include_tag "application" %> | 6 | <%= javascript_include_tag "application" %> |
| 12 | <%= csrf_meta_tags %> | 7 | <%= csrf_meta_tags %> |
| 8 | + <% if Rails.env.production? %> | ||
| 9 | + <script> | ||
| 10 | + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
| 11 | + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
| 12 | + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
| 13 | + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | ||
| 14 | + | ||
| 15 | + ga('create', 'UA-22403694-4', 'ufpb.br'); | ||
| 16 | + ga('send', 'pageview'); | ||
| 17 | + </script> | ||
| 18 | + <% end %> | ||
| 13 | </head> | 19 | </head> |
| 14 | <body> | 20 | <body> |
| 15 | <div class="navbar navbar-fixed-top"> | 21 | <div class="navbar navbar-fixed-top"> |
app/views/layouts/login.html.erb
| 1 | -<!-- | ||
| 2 | -# | ||
| 3 | -# Author Igor Amorim - www.igoramorim.com | ||
| 4 | -# | ||
| 5 | ---> | ||
| 6 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
| 7 | <html> | 2 | <html> |
| 8 | <head> | 3 | <head> |
| @@ -10,6 +5,17 @@ | @@ -10,6 +5,17 @@ | ||
| 10 | <%= stylesheet_link_tag "application", :media => "all" %> | 5 | <%= stylesheet_link_tag "application", :media => "all" %> |
| 11 | <%= javascript_include_tag "application" %> | 6 | <%= javascript_include_tag "application" %> |
| 12 | <%= csrf_meta_tags %> | 7 | <%= csrf_meta_tags %> |
| 8 | + <% if Rails.env.production? %> | ||
| 9 | + <script> | ||
| 10 | + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
| 11 | + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
| 12 | + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
| 13 | + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | ||
| 14 | + | ||
| 15 | + ga('create', 'UA-22403694-4', 'ufpb.br'); | ||
| 16 | + ga('send', 'pageview'); | ||
| 17 | + </script> | ||
| 18 | + <% end %> | ||
| 13 | </head> | 19 | </head> |
| 14 | <body> | 20 | <body> |
| 15 | <div class="navbar navbar-fixed-top"> | 21 | <div class="navbar navbar-fixed-top"> |