FMX.Analytics.AppAnalytics.TAppAnalytics.TrackEvent

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure TrackEvent(const ACategory: string; const AAction: string = string.Empty;
const ALabel: string = string.Empty; const AValue: Double = 0.0);

C++

void __fastcall TrackEvent(const System::UnicodeString ACategory, const System::UnicodeString AAction = System::UnicodeString(), const System::UnicodeString ALabel = System::UnicodeString(), const double AValue = 0.000000E+00);

Properties

Type Visibility Source Unit Parent
procedure
function
public
FMX.Analytics.AppAnalytics.pas
FMX.Analytics.AppAnalytics.hpp
FMX.Analytics.AppAnalytics TAppAnalytics

Description

Tracks a custom event.

Call this method to do your own event tracking. You might use this to track feature usage, performance data, or anything else you like, provided the information remains anonymous.

You can define a set of input parameters to describe the event being tracked. See the following table with a brief explanation of these input parameters.

Parameter Description

ACategory

The ACategory parameter is required. It can be any string, up to 64 characters. This is typically used for the broad category of the event that is tracked, but you can use it however you like.

AAction

AAction is optional. It is also a string, up to 64 characters. This is used to denote the action taken by the user to cause this event.

ALabel

ALabel is optional. It is also a string, up to 64 characters. This is used to provide a detail about the action that was performed.

AValue

AValue is optional. It is a number. This is typically used to associate a value with the action, such as a performance measurement, or a measure of the size of data processed, or a monetary value associated with some action. The Usertility web interface shows aggregate statistics about the value, categorized by category, label, and/or value.

Note: Only ACategory is required. The AppAnalytics service will record the first 64 characters of each of ACategory, AAction, and ALabel.

If your application analytics component is not enabled, TrackEvent has no effect.

If ACategory is an empty string, TrackEvent raises an EAppAnalyticsCategoryMissingException exception with the following message:

AppAnalytics custom event error: category cannot be empty.

See Also