Skip to content

Commit

Permalink
analytics.js: Move GA to own file
Browse files Browse the repository at this point in the history
  • Loading branch information
hemangsk authored and sils committed May 26, 2017
1 parent c7a0680 commit 57dfaf2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
10 changes: 0 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,3 @@
$('.github-card').html('<img src="http://placehold.it/100x100" />')
})
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-76769778-1', 'auto');
ga('send', 'pageview');

</script>
7 changes: 7 additions & 0 deletions resources/js/analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-76769778-1', 'auto');
ga('send', 'pageview');

0 comments on commit 57dfaf2

Please sign in to comment.