| 1 |
## game_analytics |
| 2 |
|
| 3 |
Enable the http://www.gameanalytics.com/[Game Analytics] analytics of your apps. Use the https://castle-engine.io/apidoc/html/CastleAnalytics.TAnalytics.html[TAnalytics] class from the https://castle-engine.io/apidoc/html/CastleAnalytics.html[CastleAnalytics] unit to initialize and send data to the analytics from your Pascal code. Also, all the purchases done using `google_in_app_purchases` service are automatically send to analytics, with correct price and currency. |
| 4 |
|
| 5 |
## Usage |
| 6 |
|
| 7 |
* Using this service requires using also using the `google_play_services` service. |
| 8 |
|
| 9 |
* The core of this service is a closed-source library distributed by GameAnalytics. It will be automatically downloaded using the _Gradle_ build system on the first build, so you don't have to do anything. |
| 10 |
|
| 11 |
* This service requires that you increase the `min_sdk_version` to 26 or higher in your link:pass:[CastleEngineManifest.xml examples][CastleEngineManifest.xml] file. The `min_sdk_version` is specified at the `<android>` element. |
| 12 |
|
| 13 |
Minimal sample manifest that uses this service: |
| 14 |
|
| 15 |
[source,xml] |
| 16 |
---- |
| 17 |
<?xml version="1.0" encoding="utf-8"?> |
| 18 |
<project name="my_project" |
| 19 |
game_units="GameInitialize" |
| 20 |
caption="My Project" |
| 21 |
> |
| 22 |
<!-- min_sdk_version="26" required by GameAnalytics --> |
| 23 |
<android min_sdk_version="26"> |
| 24 |
<services> |
| 25 |
<service name="google_play_services" /> |
| 26 |
<service name="game_analytics" /> |
| 27 |
</services> |
| 28 |
</android> |
| 29 |
</project> |
| 30 |
---- |
| 31 |
|
| 32 |
## TODO: Does GameAnalytics use Android's Advertising ID? |
| 33 |
|
| 34 |
Article from 2021 ( https://gameanalytics.com/blog/googles-identifier-policy-change/ ) talks about changes in GA version 7+, but it's 2023 and latest version is 6.4.1 ( https://github.com/GameAnalytics/GA-SDK-ANDROID/ ). |
| 35 |
|
| 36 |
- Does this version use Android's Advertising ID? |
| 37 |
|
| 38 |
- If yes, does it already declare permission `com.google.android.gms.permission.AD_ID` that you need to declare (otherwise you'll get id filled with zeroes)? |
| 39 |
|
| 40 |
They don't say in https://docs.gameanalytics.com/integrations/sdk/android to add `com.google.android.gms.permission.AD_ID` . Which may imply they don't use AAID anymore. Or that they didn't update docs about it. |