title: How to create a tracking script similar to Google analytic with js and php?
body: <p>I want to create a tracking script. Something similar with Google Analytic but very basic.</p>
  
  <p>The requirements are</p>
  
  <p>I need simple js script like Google Analytic does
  make most of the logic inside the js file from the main site
  collect in PHP the information and store it
  What I can't figure yet is what are the ways to do this? Google from what I see is loading a gif file, stores the information and parses the logs. If I do something similar sending the data to a php file Ajax cross site policy will stop me, from what I remember.</p>