not-game-analytics

1.0.2 • Public • Published

Not Game Analytics

An unofficial wrapper library for GameAnalytics. If you are searching for the official library, you'll want to check out their npm module.

To get started:

const GameAnalytics = require("not-game-analytics")

GameAnalytics.BUILD_VERSION = "vX.Y.Z"
GameAnalytics.GA_GAME_KEY = "XXXXXXXXXXXXX"
GameAnalytics.GA_SECRET_KEY = "XXXXXXXXXXXXX"

To use:

GameAnalytics.reportStageStart("Stage1")
GameAnalytics.reportStageSuccess("Stage1")
GameAnalytics.reportStageFailure("Stage1")
GameAnalytics.reportDesignEvent("FireLord:Death")
GameAnalytics.reportError(new Error("Something went wrong"))

To optionally configure:

GameAnalytics.isLogging = true // set to true to show the logs.
GameAnalytics.isReporting = false // set to false to not send reports.

Readme

Keywords

none

Package Sidebar

Install

npm i not-game-analytics

Weekly Downloads

13

Version

1.0.2

License

ISC

Unpacked Size

3.04 kB

Total Files

3

Last publish

Collaborators

  • ehgoodenough