amplitude / Amplitude-Kotlin

Amplitude Kotlin SDK
MIT License
27 stars 10 forks source link

Boolean properties getting parsed as Strings #111

Closed kennedyjosh closed 2 weeks ago

kennedyjosh commented 1 year ago

Expected Behavior

Amplitude should have processed certain properties as boolean, but instead processed them as strings.

Current Behavior

I'm seeing boolean properties show up as strings on the web dashboard, causing my events from this source to be marked invalid.

Steps to Reproduce

Code:

public void logExampleEvent(boolean success, String reason) {
    Map<String, Object> props = new HashMap<>();
    props.put("success", success);
    props.put("reason", reason);
    // amplitude variable below is initialized elsewhere as Amplitude instance
    amplitude.track("exampleEvent", props);
}
  1. Send events to Amplitude using above code 2.
  2. View events on Amplitude's Data tab, notice that the event is invalid because my tracking plan expects this event to have a boolean property "success" but it is a string instead.

Environment

Does not seem linked to a specific device type or OS other than Android.

izaaz commented 8 months ago

@kennedyjosh I tried sending the events with the function and verified that the data was coming in correctly as a boolean. Are you still seeing this issue?