Use ga-lite, which is a small, cacheable subset of Google Analytics JS client, created by Jesse Luoto. Note that this uses an API that is actually supported by Google. You can install ga-lite to your project by adding the following code to the ended...