Skip to content

Commit

Permalink
Disqus and Google Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
fellix committed May 19, 2012
1 parent 6138b84 commit c6883f0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
15 changes: 14 additions & 1 deletion _layouts/default.html
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="author" content="Rafael Felix"/>
<title>{{page.title}}</title>
<title>Rafael Felix's Blog - {{page.title}}</title>
<link rel="stylesheet" href="/css/style.css" type="text/css"/>
</head>
<body>
Expand All @@ -24,5 +24,18 @@ <h1 class="title">Rafael Felix's blog</h1>
<li><a href='/atom.xml'>Feeds</a></li>
</ul>
</footer>
<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-8426129-5']);
_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>
</body>
</html>
15 changes: 15 additions & 0 deletions _layouts/post.html
Expand Up @@ -10,4 +10,19 @@ <h2>{{page.title}}</h2>
<section id="post-content">
{{content}}
</section>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'rafaelfelixsblog'; // required: replace example with your forum shortname
var disqus_url = 'http://fellix.github.com{{page.url}}';

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
</article>

0 comments on commit c6883f0

Please sign in to comment.