Hello guys, Please find below the method I found that works best to implement Game Analytics on your BB game for iOS only. I still have not tried it on Android. But when I finally do, if there is still no tutorial in the forums for that, then I will create it when I have some time. If you find a mistake on the tutorial or have a different and better way of doing the implementation please let me know in the comments so I can edit the post. ** STEP 1** (Account and app creation on Game Analytics) * Go to https://go.gameanalytics.com/ and register an account with them - it is free of charge and quite easy to create. * Add your game to your account by clicking on "add game" on the home page. In this case we are calling the game "Buildbox Tutorial" . f your game is already on the App Store then press search after typing its name. If it's not live on the store, then press "my game is not available on the App Store" Then the site is going to ask you to select the platform of your game, in this case we are choosing iOS - then press "next" Then you are going to get to this screen: In here you must use the same bundle ID that you have in your BB project and also on your iTunes connect app project. Add an icon if you already have one (not compulsory - but it will help you track better the app once you have more than one in the analytics tool) We press next again, and we are going to get to the following screen: In here just pick the genres of your game and press "add a game", In this screen you are going to be able to display the "Game Key" and also the "Secret Key", Both of those keys are important for the implementation of the code in your app. Finally we click on iOS and the following screen will appear showing us again our Game Key and Secret Key and also giving us the link to download the SDK which will be implemented in your game. Download the SDK folder and place it on your desktop. **END OF STEP 1 ** The next post will be about the implementation of the SDK on xcode
** STEP 2 ** Xcode implementation: 1) Export your BB project to iOS 2) Open your xcode project: 3) Resize the xcode screen so you can also display the desktop - you are going to need to drag some items from the desktop to your xcode project, so this will be handy for the implementation. If you have two screens then ignore this part. 4) Open the GA SDK that you placed earlier on your desktop: 5) Create a subfolder on your "iOS" to place there the SDKs from GA, and also to keep things tidy Right click on the iOS folder and select "New group" and name it Game Analytics 6) Go to your desktop and open the GA SDK folder you placed there earlier, and go to the Library folder. Then you are going to drag the two files that appear in the library folder and you are going to place them inside your xcode, just in the folder you previously created: The files are called: “GameAnalytics.h” and “libGameAnalytics.a” When you drop the files to your xcode project, the following pop up window will appear and you are going to tick "Copy items if needed" - please be sure you are ticking that box - IMPORTANT And then press "finish" If you did the previous steps correctly this is how your folders menu on xcode should look like: Then go to Build Phases and click "Link Binary with Libraries" The menu will drop down. Scroll all the way down until you see the following plus sign, Click on that plus sign, and then add the following libraries (type them down) until they appear, select them and then click "add" •AdSupport.framework •SystemConfiguration.framework •libsqlite3.tbd •libz.tbd After you have added those 4 frameworks, click again on the plus sign and then click on "Add Other..." A pop up will appear asking you where to look for that other framework. Then navigate to the GA SDK that you previously placed on your desktop and find "libGameAnalytics.a" and click OPEN, ** STEP 2 to be continued in the following post as I can only upload up to 10 images per post, and I have reached the limit**
** CONTINUATION OF STEP 2** - xcode implementation Now you need to find the item called: "AppController.mm" and click on it, Then add the following line to the code: #import "GameAnalytics.h" And finally we are going to copy the code that is going to let our game to initiate the SDK once our game has been launched on a device. To do so, scroll down on the "AppController.mm" page until you find the following lines of code: Then click on the line just above the "return YES;" and press the enter key a few times, so you make space for the code we are going to paste Then paste the code provided by Game Analytics which contains your Game Key and Game Secret, In our case the code is the following: *sorry for the emojis appearing here - there is no way to remove them. Copy the code from this link better* https://www.gameanalytics.com/docs/ios-sdk // GAME ANALYTICS: Enable implementation log (disable in production) [GameAnalyticssetEnabledInfoLog:YES]; [GameAnalyticssetEnabledVerboseLog:YES]; // Set build version (Objective-C) [GameAnalyticsconfigureBuild"1.0"]; // Initialize (Objective-C) [GameAnalyticsinitializeWithGameKey"6139563102439f60cfb5f72f0384663c"gameSecret"4baa87cd2878390c85242c1c6e3c7fe65ec65400"]; Note 1: the build version in this case is 1.0 but I put a screenshot with that set as 2.0 instead, sorry about that mistake Note 2: the game key and game secrets change from game to game, so please be sure you are using your own keys in your project. You can find your own keys on the app menu of GA (check step 1 on how to get those) After that is done, you can build your game and open the app on your phone. ** END OF STEP 2** Notes: After you have implemented the code in your game. Launch the game and play it for a few seconds, then go to the game's dashboard to display the analytics of your game. If everything is correctly implemented then you should see (after 15 mins or so) the following screen with values other than zero:
Message to the admins: it would be nice to remove the emojis automatically popping on what we type because sometimes we need to type down some lines of codes and they make everything more complicated. Thanks
Yes @whitedogapp everything works fine with the integration, actually the last screenshot was from the GA's site showing that there is one active device, so yes - it is working. And regarding the facebook SDKs = yes I have implemented those too. But I have no notes on that, I have followed step by step the tutorial on the facebook's site. Follow this document step by step doing exactly what they say and you too are going to be able to implement it. https://developers.facebook.com/docs/ios/getting-started Good luck!
and publisher told me that they want (integrate basic setting and Facebook analytics) with this tutorial this things automaticaly will be integrated?
hey @whitedogapp This tutorial I wrote is only for the Game Analytics integration on iOS. The FB integration is a different process, you have to integrate those SDKs following the procedures mentioned in the documentation provided in the following link: https://developers.facebook.com/docs/ios/getting-started I have implemented those FB SDK on iOS before, and it is quite straight forward. I just followed the procedures mentioned in their site. I have no notes on that of my own so I cannot help you much with that. Just follow the steps mentioned on their site and you should be fine. Go carefully step by step.. I am sorry I cannot help you further, Cheers,
Hey @Christoph I was not aware we could do that - I tried to do it but I could not fix it. Please let me know how to do it when you have a sec so I can edit the post! thanks!
hey there, if the numbers are not changing from zero then you did something wrong The whole tutorial is written for Objective-C, I have not tried it on Swift yet. Follow step by step of the tutorial and you are going to be able to make it man. Good luck!