diff --git a/nuxt.config.js b/nuxt.config.js index daf2d83..c81233b 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -12,6 +12,9 @@ module.exports = { ], link: [ { rel: 'icon', type: 'image/x-icon', href: '/icon_golem.png' } + ], + script: [ + { src: '/analytics.js', async: true } ] }, /* diff --git a/static/analytics.js b/static/analytics.js new file mode 100644 index 0000000..9259b6e --- /dev/null +++ b/static/analytics.js @@ -0,0 +1,15 @@ +var owa_baseUrl = 'https://owa.thegolem.cz/' +var owa_cmds = owa_cmds || [] +owa_cmds.push(['setSiteId', '662f5e076e243cb867dae2f6c445f428']) +owa_cmds.push(['trackPageView']) +owa_cmds.push(['trackClicks']); + +(function() { + var _owa = document.createElement('script') + _owa.type = 'text/javascript' + _owa.async = true + owa_baseUrl = ('https:' == document.location.protocol ? window.owa_baseSecUrl || owa_baseUrl.replace(/http:/, 'https:') : owa_baseUrl) + _owa.src = owa_baseUrl + 'modules/base/js/owa.tracker-combined-min.js' + var _owa_s = document.getElementsByTagName('script')[0] + _owa_s.parentNode.insertBefore(_owa, _owa_s) +}())