1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00

Added Google Analytics code.

This commit is contained in:
Dan Barber 2010-12-15 05:05:00 -05:00
parent 85cf2fb4b8
commit 7fa1b15cfb
2 changed files with 19 additions and 2 deletions

View File

@ -1,2 +1,17 @@
module ApplicationHelper
def google_analytics_js
raw "<script type=\"text/javascript\">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-603600-4']);
_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);
})();
</script>"
end
end

View File

@ -16,7 +16,7 @@
<body>
<div id="page">
<div id="page">
<div id="wrapper">
<div id="container">
@ -36,7 +36,9 @@
</div>
</div>
</div>
</div>
<%= google_analytics_js %>
</body>