amplitude / Amplitude-TypeScript

TypeScript Amplitude Analytics SDK
https://amplitude.github.io/Amplitude-TypeScript/
MIT License
135 stars 39 forks source link

Latitude and Longitude always empty #908

Open dusugen opened 3 weeks ago

dusugen commented 3 weeks ago

@amplitude/analytics-react-native : "^1.4.10", "react-native": "0.72.7",

I want to have actual user position. Amplitude understand where i am, but doesn't provide Latitude and Longitude. How can I enable it ?

image

This is how I initialize :

{ init } from '@amplitude/analytics-react-native';

export const initializeAmplitude = (amplitudeKey?: string) => {
  if (amplitudeKey) {
    try {
      init(amplitudeKey);
    } catch (error) {
      console.log(error);
    }
  }
};

I tried to search COPPA setting from docs , but no settings available to watch location.

I understand that I can use custom userProperties, but I want to know if it possible to get it automatically.

Mercy811 commented 3 days ago

Hi @dusugen, you can follow the doc to set location https://amplitude.com/docs/sdks/analytics/react-native/react-native-sdk#location