added support for statcounter.com tracking code
This commit is contained in:
parent
d78dcd6ed6
commit
1b62fbea6f
@ -1526,6 +1526,11 @@
|
||||
// Keep the Google Analytics cookies to one domain -- ga._setDomainName()
|
||||
// $config['google_analytics_domain'] = 'www.example.org';
|
||||
|
||||
// Link imageboard to your Statcounter.com account to track users and provide traffic insights without the Google botnet.
|
||||
// Extract these values from Statcounter's JS tracking code:
|
||||
// $config['statcounter_project'] = '1234567';
|
||||
// $config['statcounter_security'] = 'acbd1234';
|
||||
|
||||
// If you use Varnish, Squid, or any similar caching reverse-proxy in front of Tinyboard, you can
|
||||
// configure Tinyboard to PURGE files when they're written to.
|
||||
// $config['purge'] = array(
|
||||
|
@ -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 %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user