I was interested in writing some home-brew analytic solutions and all the click tracking so far is really easy, however I was curious how GA gets the data showing how a user got to your site. Also as a followup I was wondering if it was possible to either write this functionality myself?
I was interested in writing some home-brew analytic solutions and all the click tracking
Share
GA uses javascript to gather information about the page viewed and send it to their server. As far as how the user got to your site, it looks at document.referrer for the first hit to your site with code on it.