Closed arctouch-andersonbragiatto closed 9 months ago
@arctouch-andersonbragiatto Thanks for reporting this to us. We are currently looking into this and will get back soon.
Hey @arctouch-andersonbragiatto, we did spend some time looking into this and have a question - How are you using set(profile:)
? I.E at what point in the application lifecycle do you call this method?
Just for some context -
The intended use of this method is to call it whenever there is a new user in the app and not more than once per user. If there are new properties associated with a user/profile then you can use some of the specific methods (such as set(email:)
or set(phoneNumber:)
) to set them or use the more general method such as set(profileAttribute:, value: )
As we can only identify one user on our SDK whenever the set(profile:)
method is called we reset the local state and set a new user as we assume that the prior user was logged out and we have a new user. When this happens all the events sent from the SDK/App will have an anonymous Id and will not be identified with the profile created earlier. This is documented in the API comments for the set(profile:)
method but we understand that this can be more clearly articulated in the README and it's something we plan to do. Finally, as indicated earlier, using the setter methods for email and phone number would be the way to go when there are new properties that you intent to set to the profile after it has been created using set(profile:)
.
Hey @ajaysubra, In my case it's called when the app opens, using the same profile data (firstName, lastName, and email).
Hi @arctouch-andersonbragiatto Thanks for your patience with this issue. I spent some more time looking into this and turns out our release version 2.2.0
actually had a bug in it that was causing events to not take in the profile attributes such as email, first name etc. when sending them to our backend. What I saw in my testing was a lot of anonymous profiles being created as a result of this.
Fortunately, we had a similar issue and fixed that and the one you've reported and released as part of our latest release a couple weeks ago. Please update your app to release 2.2.1
and let us know how it goes!
Hey @ajaysubra Thank you, I will try with 2.2.1
Hey @ajaysubra Thank you, I will try with
2.2.1
Hey @arctouch-andersonbragiatto: any luck with 2.2.1
?
This issue is stale due to inactivity. Please let us know if you are still encountering issues, otherwise this issue will automatically close in 10 days.
This issue has seen no updates in the past 14 days and will now be closed. Please open a new issue if you wish to report an update.
Description
Hi, I was using KlaviyoSDK in the latest version (2.2.0) and I was not able to identify the user using the
set
method provided by SDK. Every time that I call this method it starts creating a new not identified user. My solution was rolling back the version to 2.0.1 which is working great. After I call theset(Profile)
method, and start sending events my user is being identified in the Klaviyo Portal with the information provided.I did not have time to extensive reproduce this issue since rolling back the version fix the issue for me.
Checklist
main
branch of this package.Expected behavior
set(Profile)
should identify the user that sends new events with information provided (firstName
,lastName
,email
)Actual behavior
calling
set(Profile)
then sending an event, will create a new unidentified user with the new eventSteps to reproduce
set(Profile)
withfirstName
lastName
andemail
if you repeat the steps without a new app installation it will create a new user to hold for the second event
The Klaviyo Swift SDK version information
2.2.0
Destination operating system
Simulator: iPhone 14 Pro - iOS 16.2
Xcode version information
14.2 (14C18)
Swift Compiler version information