Part 2 - Download and Install
Unzip the downloaded .zip and include this in your project (the files are located in the dist folder):
<script src="/path/to/GameAnalytics.js" />
<script src="/path/to/GameAnalytics.min.js" />
GameAnalytics.jsincludes local logging to the console and is 65Kb in size.
GameAnalytics.min.jsis without logging and is 53Kb in size.
It is recommended to initially use
GameAnalytics.js while implementing the needed tracking. This will make it easier to verify correct SDK instrumentation. When done it is possible to switch to
GameAnalytics.min.js in production if it is needed to save the extra kilobytes.
If you use node packages you can also install the SDK via npm:
npm install gameanalytics
And use it like this:
var gameanalytics = require('gameanalytics'); gameanalytics .GameAnalytics.setEnabledInfoLog(true);