08.12.2013

Adding Statcounter to Contao-CMS

If you are running a Contao based website and you want to add the Statcounter.com snippet for statistics, there is no manual how to to this. I tried some different things, and this was my solution:

  • Create a file name counter.html on your webserver on toplevel of the Contao system (htdocs or something equivalent).
  • Put the Statcounter snippet in this file
<-- Start of StatCounter Code for Default Guide -->
(script type="text/javascript")
var sc_project=NNN; 
var sc_invisible=1; 
...
  • Then add the following next to the last line inside index.php:
include 'counter.html';
  • After that you will be able to get your statistics via Statcounter.com....

Keine Kommentare:

Kommentar veröffentlichen