salve a tutti.
ho il seguente codice di tracciamento:
codice:
<script type="text/javascript">
var clicky = { log: function(){ return; }, goal: function(){ return; }};
var clicky_site_id = ******;
(function() {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = ( document.location.protocol == 'https:' ? 'https://static.getclicky.com' : 'http://static.getclicky.com' ) + '/js';
( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
})();
</script>
inveced di dover modificare tutte le pagine html, potrei inserirlo nel mio file js linkato su ogni pagina cosi?:
codice:
window.onload = function() {
var clicky = { log: function(){ return; }, goal: function(){ return; }};
var clicky_site_id = *****;
(function() {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = ( document.location.protocol == 'https:' ? 'https://static.getclicky.com' : 'http://static.getclicky.com' ) + '/js';
( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
})();
}
il problema è che non sembra funzionare