Batch
BatchSDK.User.User Class Reference

Batch's User module. Setting custom user data and tracking events happen here. More...

Public Member Functions

Editor GetEditor ()
 Get the user data editor. Batch must be started to save it. More...
 
string DumpDebugUserData ()
 Dump a debug string for the user data we currently The format can change at any time without warning, so please DO NOT rely on this string for anything. More...
 
void TrackEvent (string name)
 Track an event. More...
 
void TrackEvent (string name, string label)
 Track an event. More...
 
void TrackEvent (string name, string label, Windows.Data.Json.JsonObject data)
 Track an event. More...
 
void TrackTransaction (double amount)
 Track a transaction. More...
 
void TrackTransaction (double amount, Windows.Data.Json.JsonObject data)
 Track a transaction. More...
 

Properties

string InstallationId [get]
 Get the unique installation ID, generated by Batch. Note: If the SDK isn't started, this method can return null. More...
 

Detailed Description

Batch's User module. Setting custom user data and tracking events happen here.

Member Function Documentation

string BatchSDK.User.User.DumpDebugUserData ( )

Dump a debug string for the user data we currently The format can change at any time without warning, so please DO NOT rely on this string for anything.

Can be null if Batch isn't started.

Returns
Custom data/attributes in string format
Editor BatchSDK.User.User.GetEditor ( )

Get the user data editor. Batch must be started to save it.

Returns
A new Editor instance
void BatchSDK.User.User.TrackEvent ( string  name)

Track an event.

Batch must be started or this method will do nothing.

Parameters
nameEvent name. Cannot be null. Must be a string made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters
void BatchSDK.User.User.TrackEvent ( string  name,
string  label 
)

Track an event.

Batch must be started or this method will do nothing.

Parameters
nameEvent name. Cannot be null. Must be a string made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters
labelEvent label. Can be null or any string you want
void BatchSDK.User.User.TrackEvent ( string  name,
string  label,
Windows.Data.Json.JsonObject  data 
)

Track an event.

Batch must be started or this method will do nothing.

Parameters
nameEvent name. Cannot be null. Must be a string made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters
labelEvent label. Can be null or any string you want
dataEvent data. Must be a valid Windows.Data.Json.JsonObject or null
void BatchSDK.User.User.TrackTransaction ( double  amount)

Track a transaction.

Batch must be started or this method will do nothing.

Parameters
amountTransaction amount
void BatchSDK.User.User.TrackTransaction ( double  amount,
Windows.Data.Json.JsonObject  data 
)

Track a transaction.

Batch must be started or this method will do nothing.

Parameters
amountTransaction amount
dataTransaction data. Must be a valid Windows.Data.Json.JsonObject or null

Property Documentation

string BatchSDK.User.User.InstallationId
get

Get the unique installation ID, generated by Batch. Note: If the SDK isn't started, this method can return null.