You can create properties objects to add additional information to events. You can then use this extra information to further break down the event.

Create Properties

Smartlook APIs provide user and event Properties singletons. To create other Properties for track events, use the default constructor:

Dictionary<String, String> properties = new Dictionary<String, String>(){};

Put property

You can add properties using the putString() method. Every property is defined by a name and value:

properties.Add("key", "value");


Name restrictions

  • Cannot be empty or null.
  • Maximum length is PROPERTY_NAME_MAX_LENGTH.
  • Can only contain alphanumeric characters, underscore (_), comma (,), period (.), and hyphen (-).
  • Must start with an alphabetic character.


Value restrictions

  • The maximum length is PROPERTY_VALUE_MAX_LENGTH.

Get property

You can read any property using the getString() method. If a property with the name exists, then the value is returned. Otherwise, null is returned:

String? sampleValue = properties["key"];

Remove property

You can remove any property using the remove() method, or by setting it to null:


Clear properties

You can clear all properties using clear():