Skip to content
This repository has been archived by the owner on Dec 23, 2020. It is now read-only.

Commit

Permalink
Merge pull request #29 from paskal/master
Browse files Browse the repository at this point in the history
New Google Analytics code
  • Loading branch information
kaworu committed Jul 23, 2014
2 parents 2f948e2 + b72b0a1 commit ecfe541
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion source/_includes/custom/navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li {% if page.navbar == 'Blog' %}class="active"{% endif %}>
<a href="{{ root_url }}/">Blog</a>
<a rel="index" href="{{ root_url }}/">Blog</a>
</li>
<li {% if page.navbar == 'Archives' %}class="active"{% endif %}>
<a href="{{ root_url }}/blog/archives">Archives</a>
Expand Down
17 changes: 8 additions & 9 deletions source/_includes/google_analytics.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{% if site.google_analytics_tracking_id %}
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ site.google_analytics_tracking_id }}']);
_gaq.push(['_trackPageview']);
<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','//www.google-analytics.com/analytics.js','ga');

ga('create', '{{ site.google_analytics_tracking_id }}', 'auto');
ga('send', 'pageview');

(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>
{% endif %}
2 changes: 1 addition & 1 deletion source/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

<div class="row">
<div class="page-content {% unless site.default_asides == empty and site.blog_index_asides == empty %}col-md-9{% else %}col-md-12{% endunless %}">
<div class="blog-index" itemscope itemtype="http://schema.org/Blog">
<meta itemprop="name" content="{{site.title}}" />
<meta itemprop="description" content="{{site.description}}" />
<meta itemprop="url" content="{{site.url}}" />
<div class="blog-index" itemscope itemtype="http://schema.org/Blog">
{% assign index = true %}
{% for post in paginator.posts %}
{% assign content = post.content %}
Expand Down

0 comments on commit ecfe541

Please sign in to comment.