Xamarin.Insights.Track Method
Track allows the developer to track usage of the application and add additional data to each event.

Syntax

public static void Track (string trackIdentifier, IDictionary<string, string> table)

Parameters

trackIdentifier
A unique name for this event.
table
An optional key/value store representing additional data that the developer would like to attach to this event.

Remarks

Note: The maximum amount of data that can be sent in a single Insights.Track call is 1024 characters. Anything beyond this limit will be ignored and not reported.

For example, if an application played music the following code can be used to create an event when a given song is played:

C# Example

Insights.Track("MusicTrackPlayed", new Dictionary <string,string>{
    {"TrackID", "E1D8AB93"},
    {"Length", "183"}
});        
          

Requirements

Namespace: Xamarin
Assembly: Xamarin.Insights (in Xamarin.Insights.dll)
Assembly Versions: 0.2.0.0, 1.0.0.0