Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Where put statistics htmlcode

SchryversSchryvers
edited July 2014 in Vanilla 2.0 - 2.8

Hello i use Checkstat.nl thats a statistics counter.

I dont know where to put this code, it doesnt work on the view tpl file from the bootstrap team, then there comes a oh oh error when i load my page.

this is the code:

<

script type="text/javascript" language="javascript">
function checkstat(a,v){var set=new Array();if(typeof v=="string")
{set[0]=parseInt(v.substring(0,1))}else{set[0]=(v==3||v==4)?0:1}
var jv,sz,sc,i;js="";var td=new Date();var tm=td.getTime();
var s=screen;var d=document;var l="http://checkstat.nl/cgi-bin/";
var lo=d.URL;var n=navigator;var re=typeof(top.document)=="object"?
top.document.referrer:d.referrer;for(i=0;i<=5;i++)
{d.write('js="'+i+'"<\/script>')} if(js>=1){jv=n.javaEnabled()?"y":"n"}if(js>=2){sz=s.width+"*"+s.height; sc=n.appName.substring(0,9)=="Microsoft"?s.colorDepth:s.pixelDepth;} var ar="&location="+escape(lo)+"&screensize="+sz+"&screencolors="+sc+ "&javascript=1."+js+"&java="+jv+"&referrer="+escape(re)+"&time="+tm; if(set[0]){d.write('CheckStat<\/a>')}else{d.write('image')}}checkstat('tattootalknl','110')

(the code isnt complete here above... because the site drops the helft)

Where can i put this? i want it on every page loaded because its counting the views en unique visitors.

Then i have a second problem, thats the meta words for search engine. I want to put these into the defaults master tpl but thats not the good way because when u update it its gonne delete itself?

sorry for my bad english

Comments

  • if you wan to put script in smarty templates you need to put between {literal}{/literal} tags.

    grep is your friend.

  • AdrianAdrian Wandering Spirit Montreal MVP

    Better to use pockets (choose footer location) or tracking code add-on from Github. Putting in the template means it will not count mobile users.

  • Thanks x00! Works!

    @ Adrian, yeah but i putted the code into the mobile template too.

  • AdrianAdrian Wandering Spirit Montreal MVP

    @Schryvers‌ No worries. I wanted to make sure you didn't miss out on the mobile data :D

Sign In or Register to comment.