I'm exploring the possibility of replacing the traditional Google Analytics javascript implementation with a server-side approach. The information I found so far is quite scarce (this undocumented script set is the closest thing to anything useful - https://github.com/vorodevops/nginx-analytics-measurement-protocol) but apparently, with Google's Measurement Protocol, it can be done.

I have a couple of questions regarding the implications of the whole thing / any resources that I may have missed would be very welcome as well.

  1. Can bots/crawlers be reliably identified and excluded?

  2. Can a fairly unique user ID be generated in a reliable manner (e.g. with browser fingerprinting)?

  3. Should it be implemented at http server level or with php?

    a) If http, can info from the actual content be retrieved and sent over to google?

    b) If php, would caching become an issue?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.