Menu

Set Public Event Properties

Public event properties refer to the properties that are included in every event, such as the user's source channel and the advertising ID associated with conversions.

Set Public Event Properties

     Call setSuperProperties to set public event properties.

Note:

    1. Public event properties will be saved in the cache and do not need to be called every time the app is launched.
    2. Calling the setSuperProperties method to upload previously set public event properties again will overwrite the previous properties.
    3. If a key in the public event properties overlaps with a property uploaded in an event report, the event's property will overwrite the public event property.
    4. It is recommended to set public event properties before SDK initialization using the initSeSdk method. This avoids potential issues where some reported events may not include the public event properties.
    5. Please do not use property keys that start with an underscore "_", otherwise, the property will be discarded.

Function

public static void setSuperProperties(Dictionary<string, object> userProperties)
ParameterDescriptionTypeRequired
userPropertiesDeveloper custom public event propertiesDictionaryYes

Sample Code

Dictionary<string, object> dict = new Dictionary<string, object>();
dict.Add("K1", "V1");
dict.Add("K2", "V2");   
dict.Add("K3", 2); 
SolarEngine.Analytics.setSuperProperties(dict);


Clear Defined Public Event Properties

Call unsetSuperProperty to delete the corresponding public event property of a defined key:

Function

public static void unsetSuperProperty(string key)
ParameterDescriptionTypeRequired
keyThe "key" of the public event property that needs clearing.StringYes

Sample Code

SolarEngine.Analytics.unsetSuperProperty("K3");


Clear All Public Event Properties  

Call clearSuperProperty to clear all public event properties:

Function

public static void clearSuperProperties()

Sample Code

SolarEngine.Analytics.clearSuperProperties();


Previous
Set Channel
Next
Preset Event Properties
Last modified: 2024-12-04Powered by