Castle Game EngineIntroduction Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers
|
Class TAnalytics
Unit
CastleAnalytics
Declaration
type TAnalytics = class(TComponent)
Description
Gathering analytics through Google Analytics https://www.google.com/analytics/ and/or Game Analytics http://www.gameanalytics.com/ . Right now they only work on Android, through Java APIs.
Usage:
Create an instance of it (only a single instance allowed).
Initialize at least one analytics backend using the InitializeXxx method.
Use the remaining methods, like Event, to report events in your app.
To include the necessary integration code in your Android project, declare your Android project type as "integrated" with the appropriate services (game_analytycs and/or google_analytics) inside CastleEngineManifest.xml . See https://github.com/castle-engine/castle-engine/wiki/Android-Project-Services-Integrated-with-Castle-Game-Engine .
Hierarchy
Overview
Methods
 |
constructor Create(AOwner: TComponent); override; |
 |
destructor Destroy; override; |
 |
procedure InitializeGoogleAnalytics(const AnalyticsPropertyId: string); |
 |
procedure InitializeGameAnalytics(const GameKey, SecretKey: string); |
 |
procedure ScreenView(const ScreenName: string); |
 |
procedure Event(const Category, Action, ALabel: string; const Value: Int64); |
 |
procedure Event(const Category, Action, ALabel: string; const Value: Int64; const DimensionIndex: Cardinal; const DimensionValue: string); |
 |
procedure Timing(const Category, AVariable, ALabel: string; const Time: TFloatTime); |
 |
procedure Progress(const Status: TAnalyticsProgress; const World: string; const Level: string = ''; const Phase: string = ''; const Score: Integer = 0); |
Description
Methods
 |
constructor Create(AOwner: TComponent); override; |
|
|
 |
destructor Destroy; override; |
|
|
 |
procedure ScreenView(const ScreenName: string); |
|
Send to analytics view of the screen, e.g. when user switches between UI states.
Exceptions raised
- EInvalidChar
- If the screen name contains invalid characters. Use only ASCII letters, digits, hyphens, underscores.
|
 |
procedure Event(const Category, Action, ALabel: string; const Value: Int64); |
|
Send to analytics a general event.
Exceptions raised
- EInvalidChar
- If some string contains invalid characters. Use only ASCII letters, digits, hyphens, underscores for the category and other strings.
|
 |
procedure Event(const Category, Action, ALabel: string; const Value: Int64; const DimensionIndex: Cardinal; const DimensionValue: string); |
|
Send to analytics a general event, along with a custom dimension. DimensionIndex must be > 0.
See https://developers.google.com/analytics/devguides/collection/android/v4/customdimsmets#overview about what is a custom dimension for Google Analytics (you need to create the dimension index first in Google Analytics console).
For Game Analytics, this is just used as an extra subcategory. Do not create too many different DimensionIndex + DimensionValue combinations, as each combination creates a new unique event id, and these are limited, see http://www.gameanalytics.com/docs/custom-events .
Exceptions raised
- EInvalidChar
- If some string contains invalid characters. Use only ASCII letters, digits, hyphens, underscores for the category and other strings.
|
 |
procedure Timing(const Category, AVariable, ALabel: string; const Time: TFloatTime); |
|
Send to analytics a timing event.
Exceptions raised
- EInvalidChar
- If some string contains invalid characters. Use only ASCII letters, digits, hyphens, underscores for the category and other strings.
|
 |
procedure Progress(const Status: TAnalyticsProgress; const World: string; const Level: string = ''; const Phase: string = ''; const Score: Integer = 0); |
|
Send to analytics a progress event.
Exceptions raised
- EInvalidChar
- If some string contains invalid characters. Use only ASCII letters, digits, hyphens, underscores for the world and other strings.
|
Generated by PasDoc 0.14.0.
|