Setup
In this integration guide we will take you through the most important steps of instrumenting your game with the GameAnalytics Unreal SDK.
The Godot SDK is provided as a gdextension. It includes platform support for:
- iOS
- Android
- Web
- Windows
- MacOS
- Linux
Requirements
- Godot 4.5 or later
- SCons
- Python 3.6
Installation
You can download the plugin from our github page.
The compiled plugin can be found inside example/addons/GameAnalytics. This can be copied directly inside your own project, or can be manually built.
To manually build the project you need to call the following script:
python ./build.py [platform] [debug or release]
For example to build the project for windows you may call:
python ./build.py windows release
The script will build and copy the resulting binaries inside example/addons/GameAnalytics.
Usage
After copying the GameAnalytics folder to your project you will have to enable the plugin from the editor: Project -> Project Settings... -> Plugins
- Window, Linux, MacOS
- Android
- iOS
- Web
No additional steps are necessary. The plugin will also be available inside the editor.
In the Project menu run Install Android Build Template.... Afterwards you will be able to export the plugin to Android.
Export the plugin for iOS.
In the Export dialog, add the following line in HTML -> Head Include:
<script src="GameAnalytics.js"></script>
Initialization
If the installation has been successful, you will now be able to use GameAnalytics inside your project.
First you'll have to retrieve the GameAnalytics singleton.
if(Engine.has_singleton("GameAnalytics")):
var gameAnalytics = Engine.get_singleton("GameAnalytics")
Now you can initialize GameAnalytics:
gameAnalytics.init("GAME KEY", "SECRET KEY")