Skip to main content

Setup

Download and Installation

Add in Package download

You need two parts to get the most out of the SDK for Xamarin.

  • add-in (providing settings management)
  • SDK library files

Both parts can be downloaded directly from the Github repository, here.

Unzip the downloaded .zip and take note of the .mpack file location. To install the add-in do the following depending on what OS you are on.

  • Mac: Xamarin Studio -> Add-in Manager… -> Install from file… -> select .mpack file
  • Windows: Tools -> Add-in Manager… -> Install from file… -> [select .mpack file]

Please ignore the below error message that might show up at the end of the add-in installation about failing to read the description. This is a known Xamarin bug. Just disregard it.

img

SDK library files download

To install the SDK library files from the Xamarin Component Store do the following:

  1. In your project right-click on the Components folder
  2. Choose Get more Components…
  3. In Xamarin Component Store window search for GameAnalytics SDK
  4. Click on the newly found component
  5. Click on Add to App to add the component to your project
info

Make sure to update the installed packages to the latest version by right-clicking on the Packages and choose Update.

Alternatively, you can download these files from our GIT hub repository, through the following steps:

  1. Download the .zip file from this repository here
  2. Unzip the downloaded file
  3. Depending on your target platform add the following files to the project’s references:
    • Android:
      • GameAnalytics.Android.dll
      • GameAnalytics.Android.Jar.dll
    • iOS:
      • GameAnalytics.iOS.dll
info

Target Android version must API level 22 or higher and for iOS 8.1 or higher.

For Android you must also add some additional packages. Right-click on Packages folder, choose Add packages… and add the following:

Xamarin.Android.Support.v4
Xamarin.Android.Support.v7.AppCompat

Sign up and login

To use GameAnalytics you need a game key and a game secret for each platform you are using (iOS/Android).

info

game key is a unique identifier for your game. secrect key is used to protect event data from being tampered with as it travels to the GameAnalytics servers.

tip

Using the Xamarin Studio add-in (settings) it is possible to sign up/login, and then create/retrieve these keys automatically. So a first step, make sure you are signed up under there GameAnalytics section!

Sign up

  1. To sign up with Xamarin right-click on your project and choose Options in the context menu and scroll down to the GameAnalytics section. Under any of the menu items in this section you can click on the Sign up button to sign up.
  2. During this process an account will be created with a studio containing one game. You will be automatically logged in afterwards.

img

After you have signed up you will be asked to create a game. If your game is already published and in the app store, you can search for it using the provided app store search or you can create a new game.

img

Log-In

To login right-click on your project and choose Options in the context menu and scroll down to the GameAnalytics section. Under any of the menu item in this section you can click on the Login button to open the login dialog and enter your credentials. After succesful login under the Setup menu item you can select a studio and game. When a game is selected, the game key and secret key will be automatically fetched and configured.

info

Once a game has been created it can take a few minutes before the GameAnalytics servers will accept events for that game. You can of course always create games manually in our tool and locate the keys in the game settings.

Configure XCode

To access configuration settings you need to right-click on your project, choose Options in the context menu and scroll down to the GameAnalytics section.

img

SDK Setup

Under the settings, from your Setup tab you specify the game keys, secret keys and the build version for each platform.

For each platform used (iOS/Android) you need to configure the following:

  • game key is a unique identifier for your game.
  • secret key is used to protect event data from being tampered with as it travels to the GameAnalytics servers.
  • A build is used to specify the current version of your game. Specify it using a string.
tip

For the build it is recommended to use a 3 digit version like: [major].[minor].[patch]

tip

The build version should be used for changing production builds of the game.

tip

We recommend creating a separate game when implementing or testing the SDK.

Custom Settings

Here you can configure available custom dimensions and resource types.

Custom Dimensions: During gameplay it is possible to set up to 3 different custom dimensions. For each custom dimension it is needed to specify a whitelist. You cannot set a custom dimension value unless it is specified here first. For more information about custom dimensions go here.

Resource Types: When submitting resource events you specify a resource currency and resource item type. It is needed to specify a whitelist for each of these. You cannot submit a resource event using other values than specified here.

img