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

Add basic amplitude event to count DAU #18

Merged
merged 4 commits into from
May 24, 2022
Merged

Add basic amplitude event to count DAU #18

merged 4 commits into from
May 24, 2022

Conversation

mjmayank
Copy link
Collaborator

No description provided.

@mjmayank mjmayank requested a review from Nnanyielugo May 24, 2022 21:33
@@ -43,6 +44,11 @@ const Navigator: React.FC = () => {
appState.current,
);

React.useEffect(() => {
const ampInstance = Amplitude.getInstance();
ampInstance.init('b628782272a6f671076be09a7b6fb6b7');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need to move the API key to an environmental variable like so: AMPLITUDE_KEY={{API_KEY}} in both the config files (.env.dev and .env.prod) and import it into the index file.

import config from 'react-native-config';

...
// other code
...

React.useEffect(() => {
    const ampInstance = Amplitude.getInstance();
    ampInstance.init(config.AMPLITUDE_KEY);
}, [])

@Nnanyielugo Nnanyielugo merged commit 589fbb1 into main May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants