Improved GA tracking
This commit is contained in:
parent
641ea98ba9
commit
962c14691c
3 changed files with 23 additions and 5 deletions
|
@ -3,6 +3,7 @@ description: '[...] procedure calls may be usefully thought of as GOTO stat
|
|||
disqus_shortname: blog-kempkens-io
|
||||
#Your site's domain goes here. Leave localhost server or blank when working locally.
|
||||
url: http://blog.kempkens.io
|
||||
source_url: https://github.com/nifoc/blog.kempkens.io
|
||||
|
||||
# Owner/author information
|
||||
owner:
|
||||
|
@ -28,7 +29,11 @@ background:
|
|||
|
||||
# Analytics and webmaster tools stuff goes here
|
||||
google_analytics: UA-28082386-3
|
||||
google_analytics_site: blog.kempkens.io
|
||||
google_analytics_linker:
|
||||
'daniel.xxx':
|
||||
- blog.kempkens.io
|
||||
'blog.kempkens.io':
|
||||
- daniel.xxx
|
||||
google_verify:
|
||||
# https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here
|
||||
bing_verify:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<span>
|
||||
© {{ site.time | date: '%Y' }} {{ site.owner.name }}. Powered by <a href="http://jekyllrb.com">Jekyll</a> using the <a href="http://mademistakes.com/hpstr/">HPSTR Theme</a>.<br />
|
||||
<a href="https://github.com/nifoc/blog.kempkens.io">Source on GitHub</a>
|
||||
© {{ site.time | date: '%Y' }} {{ site.owner.name }}. Powered by <a href="http://jekyllrb.com">Jekyll</a> using the <a href="http://mademistakes.com/hpstr/">HPSTR Theme</a>.
|
||||
{% if site.source_url %}<br /><a href="{{ site.source_url }}">Source on GitHub</a>{% endif %}
|
||||
</span>
|
||||
|
|
|
@ -9,8 +9,21 @@
|
|||
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 }}', '{{ site.google_analytics_site }}');
|
||||
ga('send', 'pageview');
|
||||
(function() {
|
||||
var linkerOptions = {{ site.google_analytics_linker | jsonify }};
|
||||
var host = window.location.host;
|
||||
|
||||
if (linkerOptions !== null) {
|
||||
ga('create', '{{ site.google_analytics }}', host, 'auto', {
|
||||
'allowLinker': true
|
||||
});
|
||||
ga('require', 'linker');
|
||||
ga('linker:autoLink', linkerOptions[host]);
|
||||
} else {
|
||||
ga('create', '{{ site.google_analytics }}', host);
|
||||
}
|
||||
ga('send', 'pageview');
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
{% if page.comments %}{% include disqus_comments.html %}{% endif %}
|
||||
|
|
Loading…
Reference in a new issue