mazodude / roadrunneranalytics-js

Javascript code for analytics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Road Runner Analytics-js

This is the javascript only for the analytics project

Example:

<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['RR-0001-01']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'example.com/stats.php';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>

In the stats.php file I use a packer from http://joliclic.free.fr/php/javascript-packer/en/

Caching done with my PHP class here https://github.com/mazodude/roadrunnercache

About

Javascript code for analytics

License:MIT License


Languages

Language:JavaScript 93.3%Language:PHP 6.7%