04/07
2013
Wallogit.com
2017 © Pedro Peláez
Symfony2 bundle providing analytics measurement via JavaScript.
Symfony2 bundle providing Google like analytics measurement API via JavaScript., (*1)
Features:, (*2)
ea('key','value') and ea('key': ['arr','ay'])
Place this code in HTML header:, (*3)
<script>
(function(i,d,t,a,u,g,s){i['EdgeAnalyticsObject']=a;i[a]=i[a]||function(){
(i[a].q=i[a].q||[]).push(arguments)};i[a].t=1*new Date();g=d.createElement(t);
g.src=u;s=d.getElementsByTagName(t)[0];s.parentNode.insertBefore(g,s);
}(window,document,'script','ea','/analytics/js'));
// Custom collect route: string (defualt: '/analytics/collect')
// Warning: URL parmeter 'z' is dedicated fot Cache Busting Token
ea('_url','/analytics/collect?a=x');
// Send Cache Busting Token: true|1|'on' (default: true)
ea('_usecbt', 'on');
// Collect response length: int (defualt: 35 = lenght of ea.gif)
ea('_checksum','35');
// Custom key: value paremeter
ea('key', 'value');
// Custom key: array paremeter
ea('keyx', ['value1','value2','value3']);
</script>
Test folder contains mock server powered by node.js Express and index.html.
You will need node.js (brew install node) and its package manager NPM
(curl http://npmjs.org/install.sh | sh., (*4)
Steps:, (*5)
cd in to the Tests
npm install (npm start or node.js server.js
open http://localhost:4000/