Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Commit 6585e00

Browse files
committed
Merge pull request rspec#40 from rspec/ga
Add google analytics tracking snippet.
2 parents 531b294 + b7baa40 commit 6585e00

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

source/_google_analytics.html.erb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<script>
2+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
6+
7+
ga('create', 'UA-59095215-1', 'auto');
8+
ga('send', 'pageview');
9+
10+
</script>

source/layouts/layout.slim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ html.no-js lang="en"
3838
li= link_to 'Get Help', '/help'
3939
li= link_to 'Contributing', '/contributing'
4040
= yield
41+
= partial 'google_analytics'

0 commit comments

Comments
 (0)