segment-integrations / analytics-ios-integration-amplitude

The Amplitude analytics-ios integration.
MIT License
11 stars 45 forks source link

User properties don't override with last version (2.0.0) #60

Open jgauthie opened 6 years ago

jgauthie commented 6 years ago

Hi,

After few emails and tests with people from both Amplitude and Segment, we found out a strange behaviour in the last version of this SDK.

Basically, every time you try to override a user property that is already existing on the user by providing a new value. The old value is kept, and you cannot update it.

In order to reproduce the bug, just set up a new XCode project with the following pods: pod 'Analytics', '~> 3.0'
pod 'Segment-Amplitude'

Then do an identify call with a trait (key: value) followed by another identify call with the same key but another value (key: value2).

screen shot 2018-04-09 at 16 54 21

Here is what the Segment's debugger shows, which is good so far:

screen shot 2018-04-09 at 16 52 25

then:

screen shot 2018-04-09 at 16 52 35

Normally, you should see the value2 appears under the key user property under Amplitude's UI for the corresponding user. By using the version 2.0.0 of this SDK, it doesn't work:

screen shot 2018-04-09 at 16 53 02

However, by downgrading to version 1.5.0 it worked, that's the fix I'm using right now. pod 'Analytics', '~> 3.0' pod 'Segment-Amplitude', '~> 1.5.0'

Attached, some screenshots to showcase the problem. Thanks!

ladanazita commented 6 years ago

Hey @jgauthie !

Do you have any settings configured in the Segment destination panel for Amplitude? Trying to understand the exact setup you have to try and reproduce this.

The 2.0.0 release had a lot of new setting changes included. I'm wondering which of these could be related.

Thanks! Ladan

jgauthie commented 6 years ago

Hey @ladanazita

Yes, we have some settings included, below, a screenshot of them:

screen shot 2018-04-11 at 16 59 33 screen shot 2018-04-11 at 16 59 42
jgauthie commented 6 years ago

Actually, I changed a setting since then, the batch events was set to "true" during my tests :)