diff options
| author | Tomasz Konojacki <me@xenu.tk> | 2014-08-24 23:40:19 +0200 |
|---|---|---|
| committer | Tomasz Konojacki <me@xenu.tk> | 2014-08-24 23:40:19 +0200 |
| commit | f7b6693c027ae42f791cdadd6625e48a58c732db (patch) | |
| tree | b620cf20f5bca7b9285f81c67ec0f0ec5705f78b /templates | |
| parent | d78dcd6ed6efefba9b67529663610b62e8b38228 (diff) | |
| parent | 1b62fbea6f19bae1fd09e76de533e507aa50fc46 (diff) | |
Merge pull request #75 from xenu/master
added support for statcounter.com tracking code
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/main.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/templates/main.js b/templates/main.js index f7b99a42..97f1135f 100644 --- a/templates/main.js +++ b/templates/main.js @@ -305,3 +305,11 @@ onready(init); var _gaq = _gaq || [];_gaq.push(['_setAccount', '{% endraw %}{{ config.google_analytics }}{% raw %}']);{% endraw %}{% if config.google_analytics_domain %}{% raw %}_gaq.push(['_setDomainName', '{% endraw %}{{ config.google_analytics_domain }}{% raw %}']){% endraw %}{% endif %}{% if not config.google_analytics_domain %}{% raw %}_gaq.push(['_setDomainName', 'none']){% endraw %}{% endif %}{% raw %};_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();{% endraw %}{% endif %} +{% if config.statcounter_project and config.statcounter_security %} +var sc = document.createElement('script'); +sc.type = 'text/javascript'; +sc.innerHTML = 'var sc_project={{ config.statcounter_project }};var sc_invisible=1;var sc_security="{{ config.statcounter_security }}";var scJsHost=(("https:" == document.location.protocol) ? "https://secure." : "http://www.");document.write("<sc"+"ript type=text/javascript src="+scJsHost+"statcounter.com/counter/counter.js></"+"script>");'; +var s = document.getElementsByTagName('script')[0]; +s.parentNode.insertBefore(sc, s); +{% endif %} + |
