GameAnalytics is a powerful analytics engine for game studios that supports the full life
cycle from acquisition to retention to monetization of players - with a particular emphasis on user experience.
GameAnalytics has been built to specifically support the very data intensive games industry with tailor made reporting
such as completion time per level, 3d heatmaps of in-game evens, and a pricing model that allows developers to track an
unlimited amount of in-game player behavior.
GameAnalytics for laravel 4 (ga-4-laravel) is a service provider for php laravel 4 framework. It is simple library/wrapper
that provides you some useful methods to deal with Game Analytics REST API.
There are two ways to configure ga-4-laravel (GameAnalytics Service Provider for laravel 4). You can choose the most convenient way for you.
You can put your GameAnalytics.com credentials into app/config/gameanalytics.php (option 1) file or use
package config file which you can be generated through command line by artisan (option 2).
Option 1: Configure GameAnalytics Service Provider using app/config/gameanalytics.php file
Create new config file in app/config/ directory and name it gameanalytics.php. Now simply edit created file and put there below code:
// send data to user category using query() method:$ga = GameAnalytics::query('user', $userData)->send();
// send data to user category using queryUser() method:$ga = GameAnalytics::queryUser($userData)->send();
You can use these methods to send data to other categories: queryDesign(), queryBusiness(), queryQuality() or just pass name of the category (user, business, design, quality) as first parameter of query() method.
More usage examples
Go to Official docs to find more usage examples and informations about GA REST API.