Skip to main content
Question

Scientific notation used for numeric attribute on RN/Android


Hi. I’m using the React Native client library and I’ve noticed that an Android user has an attribute recorded against their customer.io user record like this:

createdAt

1.6515671E+9

 

I’ve exported that user’s data and in the attributes.json file it is represented like this:

  "createdAt": "1.6515671E+9",

 

When I look at the same attribute for iOS users, it is correctly represented as a numeric timestamp:

createdAt

1702984243      Today at 11:10:43 am (GMT)

 

and the attributes.json for that iOS user contains:

"createdAt": "1702984243",

 

This is how I call the RN library to set that attribute:

CustomerIO.identify(analyticsId, {
  createdAt,
  // ... other attributes here
});

The `createdAt` value is always a number at this point. 

 

Do you have any suggestions on how I can resolve this? It looks like there used to be a similar issue with the serialization library on Android: https://github.com/customerio/customerio-android/pull/56 

 

Thanks

Lee

2 replies

Penny
  • 133 replies
  • December 26, 2023

Hi Lee,

 

Would you be able to let us know which version of our RN SDKs are you currently using so we can check with our mobile team on this?


  • Author
  • Novice
  • 2 replies
  • December 28, 2023

Hi. Yes it’s: customerio-reactnative@3.3.2 and io.customer.android:tracking@3.8.0

 

I’ve pushed another version of our app with the `createdAt` moved out of the call to `identify` and into `setProfileAttributes`. I am not certain if this has 100% resolved the issue but it looks initially like it’s fixed the issue for at least some set of users.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings