The DeviceIdentifier method

Version:

To add the device identifier property to an event, use the DeviceIdentifier() method.

PropertyDetails
UT SDK methodsDeviceIdentifier(string)
Required/optionalOptional
Multiple invocationsMultiple invocations are forbidden and cause an InvalidOperationException exception
Value validationMust contain at least one symbol besides whitespace characters

Field names cannot be null or empty

Recommended values are identifierForVendor() for iOS, and getSerial() or similar for Android

For example:


Dictionary<string, string> customParameters = new Dictionary<string, string>();
customParameters.Add("param11", "paramValue11");
customParameters.Add("param22", "paramValue22");
customParameters.Add("param33", "paramValue33");

var eventRequest = UTRequestBuilder.EventWithDefinitionId("01f8ffbf-d662-4a87-beee-413307055c48")
                                   .AddCustomValues("key1", "value1")
                                   .AddCustomValues("key2", "value2")
                                   .AddCustomValues(customParameters)
                                   .ParentEventId("01f8ffbf-d662-4a87-beee-413307055c48")
                                   .Timestamp(DateTime.Now)?

If you have suggestions for improving this article, let us know!