Flurry Analytics for Android homepage

Welcome to the Flurry Analytics for Android extension for Gamemaker Studio page!
Requires gamemaker studio 1.4 or higher, minimum project SDK setting is 16. GMS 2 is also supported.


 You need to make an account on Flurry at
https://developer.yahoo.com/monetize

You also need to download the googleplay services
extension from the marketplace at
 https://marketplace.yoyogames.com/assets/2008/google-play-services
and add it to your project.


On your Flurry dashboard you will need to create a project, give it your game's exact name (case sensitive, for example if
you're using my example project, name your flurry project FlurryAnalyticsForAndroid) and fill out the
details. You will then be given an app id which you will need to init the extension. (In my example project the app Id would
go in alarm[0] of object FlurryController)


 Next open the global game settings > android > social tab, and in the google
services box tick the enable google services checkbox and then enter the app Id.


You now will be able to test your game and see results on your Flurry dashboard without having to upload your game to
the google playstore. (You do however have to final build your game by clicking the "create executable for target" option)
Remember that you don't create events on your Flurry dashboard. Instead, when you pass events from
your game, they are then created on your Flurry dashboard at that time. On initial testing it can take up to 48 hours to work
while Flurry proccesses your game. Once you do submit your app to the google play store you can go to your Flurry dash
and edit your app info accordingly, to be safe make sure your game Id didn't change on the Flurry dash, if it did, then put
the new game Id in the social event menu and your init function of your app and re-submit it to the google playstore.


A note on permissions for Android 6.0 and up, WRITE_EXTERNAL_STORAGE is required and included in the extension,
ACCESS_FINE_LOCATION is also included but not mandatory, if you don't use it then Flurry will only report device
events by country only. If you decide not to use it either don't include the permission in your global game settings, or if testing/using my example project take the permission out by going to the extension package
properties > Android tab > Android Permissions box and remove it. Remember that google play forbids permissions to be added to the
Android manifest if they are not used in your app.



There are 7 functions you can use to send analytics from your game to your Flurry dashboard,  Each is explained below:

InitFlurryAnalytics(String);
First off when your player runs the game for the first time the player will be taken to the ads privacy dashboard where they
can either adjust their privacy settings (applicable to your game only) or easilly exit the dashboard, after that the game will
never ask again, but note that you should include a button in your menu or at gamestart that alows the player to go to the
privacy dashboard at any time.
Argument 0 is mandatory and is the "Game_Id" which you get when entering your app on your Flurry dashboard.

OpenGDPRDash();
Call this function in a menu or button press to allow the player to access his privacy dashboard for the game. When the player
closes the privacy dashboard the extension will automatically re-init with the new settings.
To allow your player to retreive what data is collected (DSR) by your app you should use the Gamemaker Studio function
openUrl("url"); with oath's collected data reporting web page, you could use the left mouse click for example:
url_open("https://yahoo.mydashboard.oath.com/");

SendFlurrySimpleEvent(String);
Call this whenever the player does something in your game that you want to be notified of in your Flurry analytics dashboard, no
value is returned, it is usefull for knowing that a player did something in your game. Pass the "Event_name" as the argument.

SendFlurryMappedEvent(String, String);
Call this whenever the player does something in your game that you want to be notified of in your Flurry analytics dashboard,
This will send a key - value pair as a string so you can get a value of something like player level up, etc.
Pass the "Event_name" as argument 1 and "Event_values" as argument 2. You can send up to 10 value pairs each seperated by
a comma
iT IS RECOMENDED TO BUILD A SINGLE STRING IF YOU HAVE MIXED STRING AND INTEGER VALUES TO PASS TO ARGUMENT 2
example:
var levelUp = "Name,Skontz,Level,"+string(global.level)+"MaxHp,"+string(global.maxHp);
logMappedEvent("Your_Mapped_Event_Name",levelUp);

GetPerms();
Optional, if you are using gamemaker's built in function to ask for permissions please use WRITE_EXTERNAL_STORAGE, and
ACCESS_FINE_LOCATION.
Android os 6.0 and up require asking for permissions, call this at least 10 steps before initting FlurryAndroidAnalytics for this
extension to work properly

ExitTheApp();
Bug fix for Gamemaker 1.4.1804, call this to close your app, otherwise the player will have to use the home button to do it.

FlurryAnalyticsReady();
Returns real. Can be used to check if the extension is active, for example, call before
SendFlurrySimpleEvent(String) and SendFlurryMappedEvent(String, String).

No comments:

Post a Comment