When an interesting event occurs in your Unity application, tag it using these
instructions.
You may want to collect additional data about some events, such as how many lives a
player has or the last action a user took before clicking on an advertisement. Collect
this additional data with the second form of tagEvent, which takes a
dictionary of key/value pairs, or attributes, along with the event name.
-
Tag a single event with no attributes by adding the following line of code,
where “Options Saved” is a string describing the event.
For either iOS or
Android:
Localytics.TagEvent("Options Saved");
-
If you want to add attributes, modify the tag to include a dictionary of
key/value pairs.
var dictionary = new Dictionary<string, string>();
dictionary.Add(“display units”, “mph”);
dictionary.Add(“age range”, “18-25”);
Localytics.TagEvent("Options Saved", dictionary);