-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
identifyUser in react and react native on in-app and push notification fail to populate many fields (location, timezone,locale) #13006
Comments
Hello, @ericowhadi and sorry to hear your'e running into this. Can you clarify if this is being experienced with Apple Push Notification service (APNs), Firebase Cloud Messaging (FCM), or both? Also, can you double check that the required credentials have been input for your desired service channel within the Pinpoint console? Should be able to verify this under the project > Configure features > Push Notifications > service provider. |
the issue exist on both APNs and FCM and on in-app messaging (both react native and react). |
note that for APN, I have not yet enabled APNs backend, but the identifyUser workflow is independent of the push notification service provider. Service provider is important to receive the token, and then the identify user update the pinpoint Endpoint with the token in the address field. on Apple, because I don't yet have my DUNS number to create a valid apple developper account that can enable the APN service I have not tested really end to end. However, I know it fails because calling the IdentifyUser with a fake token does correctly update the Endpoint with the fake token, along with many other attributes, except the failed ones. |
update, actually, after more testing, it is more than I previously said. All the demographic values are wrong (not populated). I saw that looking at android push notification from both emulator and real device pixel 7, none of the data about demographics gets updated, and for both device I am getting the same values in pinpoint: Default values: |
Hi @ericowhadi, thanks for providing the code snippet. I notice that the demographic, metrics and location object blocks are outside the It should be as shown in the docs: https://docs.amplify.aws/javascript/build-a-backend/more-features/in-app-messaging/identify-user/ For a quick review: const identifyUserInput = {
userId: '', // E.g. user-id
userProfile: {
email: '', // E.g. [email protected]
name: '', // E.g. name-of-the-user
plan: '' // E.g. plan-they-subscribe-to
customProperties: {
// E.g. hobbies: ['cooking', 'knitting'],
},
demographic: {
appVersion: '',
locale: '', // E.g. en_US
make: '', // E.g. Apple
model: '', // E.g. iPhone
modelVersion: '', // E.g. 13
platform: '', // E.g. iOS
platformVersion: '', // E.g. 15
timezone: '' // E.g. Americas/Los_Angeles
},
location: {
city: '', // E.g. Seattle
country: '', // E.g. US,
postalCode: '', // E.g. 98121
region: '', // E.g. WA
latitude: 0.0,
longitude: 0.0
},
metrics: {
// E.g. logins: 157
},
},
}; |
@Samaritan1011001 oops, my bad, I should be more careful following the docs. Sorry again, and thanks for catching my mistake. |
Before opening, please confirm:
JavaScript Framework
React, React Native
Amplify APIs
Push Notifications
Amplify Version
v6
Amplify Categories
notifications
Backend
Amplify CLI
Environment information
Describe the bug
I am using both in-app and push notification on a react native and a react webapp. Of course the push notification on react web app is not don eusing amplify since it is not supported, but I wired it manually using firebase and a lamda that proxy a call to pinpoint updateEndpoint API.
When using the api of updateUser from aws-amplify/in-app-messaging or from aws-amplify/push-notifications both api even if returning success, fail to internally update pinpoint fields that a direct call to pinpoint updateEndpoint API successfully update. These fields are:
demographic.locale
demographic.timezone
location.latitude
location.longitude
location.city
location.country
location.postalCode
location.region
Expected behavior
All these field should be correctly populating the Pinpoint internal database. Else not campaign targeting these field will work
Reproduction steps
follow direction to install and configure ether amplify push notification on react native, or in-app notifications in ether react or react-native.
Then, invoke identifyUser in ether in-app or push-notifications.
make sure you populate the demographic and location that are reported buggy.
And then go to pinpoint console, segment, export segment. THen look at the excelsheet, and see that all the boggus fields are indeed blank. I have verified that directly invoking pinpoint updateEndpoint API , I correctly populate these fields and they do show up on the exported endpoints collected as mentioned above via pinpoint console.
Code Snippet
// Put your logs below this line
The text was updated successfully, but these errors were encountered: