react-native-analytics-segment-io
react-native-analytics-segment-io copied to clipboard
Nested properties not tracked?
I'm following Segment's analytics spec for ecommerce (see: https://segment.com/docs/spec/ecommerce/v2/#order-completed).
So I'm calling the track
method with properties like this:
{
order_id: '123',
...
products: [{
product_id: 'xyz',
quantity: 1,
price: 99,
}],
}
When I log out the properties in Xcode via NSLog
I see them coming in:
"order_id" = "123";
products = (
{
price = 99;
"product_id" = "xyz";
quantity = 1;
}
);
But in Segment all product props are missing...
[[SEGAnalytics sharedAnalytics] track:@"Order Completed", properties: @{
@"order_id" : @"123",
...,
@"products" : @[
@{
}
]
}];
I noticed when I rename product_id
property to just product
the property seems to go through so there seems to be some parsing issue of the properties in objective-c.