Skip to content
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

Location Not Capture for Amplify Analytics in Pinpoint in React Native #6190

Closed
mynameisguy opened this issue Jun 28, 2020 · 8 comments
Closed
Labels
Analytics Related to analytics to-be-reproduced Used in order for Amplify to reproduce said issue

Comments

@mynameisguy
Copy link

Describe the bug
When reporting events using Amplify Analytics Location is empty

To Reproduce
check any event reported from react-native using amplify analytics and check the location field.

Expected behavior
the location should be reported at least at a country level.

@mynameisguy mynameisguy added the to-be-reproduced Used in order for Amplify to reproduce said issue label Jun 28, 2020
@Amplifiyer Amplifiyer added the Analytics Related to analytics label Jun 29, 2020
@ohlr
Copy link

ohlr commented Jun 30, 2020

The same happens for amplify within react (web). While all standard attributes are reported, location remains empty.

@Amplifiyer
Copy link
Contributor

@ohlr and @mynameisguy, how are you adding the location information, in the default config while configure Analytics https://docs.amplify.aws/lib/analytics/getting-started/q/platform/js#set-up-existing-analytics-backend or while updating the end point https://docs.amplify.aws/lib/analytics/getting-started/q/platform/js#update-endpoint

Do you see the location information being present in the http request when seen in the developer console? If yes, are you seeing location data being absent in the pinpoint console?

@ohlr
Copy link

ohlr commented Jul 2, 2020

My setup:
https://docs.amplify.aws/lib/analytics/getting-started/q/platform/js#configure-your-app
https://docs.amplify.aws/lib/analytics/autotrack/q/platform/js#session-tracking

import Amplify, { Analytics } from 'aws-amplify';
import awsconfig from './aws-exports';

Analytics.autoTrack('session', {
    enable: true,
});
Analytics.autoTrack("pageView", {
    enable: true,
    type: "multiPageApp",
});



Amplify.configure(awsconfig);

Location is not in the request

image

@mynameisguy
Copy link
Author

I'm not adding the location information manually. Should I?

@Amplifiyer
Copy link
Contributor

yes, the location is supposed to be provided by the user, either in the udpateEndPoint() API's attributes or while configuring Amplify or Analytics category. I have provided the link for both in my previous comment.

Code for reference:

location: {
...defaultEndpointConfig.location,
...event.location,
},

and what demographic information is provided by default by Amplify https://github.com/aws-amplify/amplify-js/tree/main/packages/core/src/ClientDevice

@ohlr
Copy link

ohlr commented Jul 2, 2020

@Amplifiyer Google Analytics as far as I know provides approximate user location based on ip address... I wonder why a paid service like pinpoint/amplify does not provide that

@ohlr
Copy link

ohlr commented Jul 3, 2020

Besides seeing this as a feature request I would also appreciate if the docs could be updated with respect to what is captured automatically and what not.
Knowing in advance that features such as location / session duration are not supported yet would improve comparability to other frameworks out there

@github-actions
Copy link

github-actions bot commented Jul 3, 2021

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Analytics Related to analytics to-be-reproduced Used in order for Amplify to reproduce said issue
Projects
None yet
Development

No branches or pull requests

3 participants