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

feature: add browser_open event #208

Merged
merged 4 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/core/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { store } from '$store';
import { AppearanceAccents, DarkTheme, TonTheme } from '$styled';
import { AppNavigator } from '$navigation/AppNavigator';
import { Toast, ScrollPositionProvider } from '$uikit';
import { trackEvent, trackFirstLaunch } from '$utils';
import { useMemo } from 'react';
import { accentSelector } from '$store/main';
import { ToastComponent } from '$uikit/Toast/new/ToastComponent';
Expand Down Expand Up @@ -35,13 +34,7 @@ const TonThemeProvider: FC = ({ children }) => {
);
};

trackFirstLaunch();

export const App: FC = () => {
useEffect(() => {
trackEvent('launch_app');
}, []);

return (
<StoreProvider {...{ store }}>
<TonThemeProvider>
Expand Down
7 changes: 6 additions & 1 deletion src/navigation/MainStack/TabStack/TabStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { TabsStackRouteNames } from '$navigation';
import { TabStackParamList } from './TabStack.interface';
import { Icon, ScrollPositionContext } from '$uikit';
import { useTheme } from '$hooks';
import { isAndroid, nfs, ns } from '$utils';
import { isAndroid, nfs, ns, trackEvent } from '$utils';
import { t } from '$translation';
import { SettingsStack } from '$navigation/SettingsStack/SettingsStack';
import { NFTs } from '$core/NFTs/NFTs';
Expand Down Expand Up @@ -159,6 +159,11 @@ export const TabStack: FC = () => {
options={{
tabBarLabel: t('tab_browser'),
}}
listeners={{
tabPress: e => {
trackEvent('browser_open')
},
}}
/>
<Tab.Screen
component={SettingsStack}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/constants/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const TEST = 1;

export const ServerConfigVersion = 1;
export const ServerConfigVersion = 2;

export const GOOGLE_PACKAGE_NAME = 'com.ton_keeper';
export const APPLE_STORE_ID = '1587742107';
Expand Down
6 changes: 5 additions & 1 deletion src/store/main/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import { Cache } from '$store/events/manager/cache';
import { Cache as JettonsCache } from '$store/jettons/manager/cache';
import { getWalletName } from '$shared/dynamicConfig';
import { destroyEventsManager } from '$store/events/sagas';
import { initStats } from '$utils';
import { initStats, trackEvent, trackFirstLaunch } from '$utils';
import { nftsActions } from '$store/nfts';
import { jettonsActions } from '$store/jettons';
import { favoritesActions } from '$store/favorites';
Expand Down Expand Up @@ -166,6 +166,10 @@ export function* initHandler(isTestnet: boolean, canRetry = false) {

initStats();

trackFirstLaunch();
trackEvent('launch_app');


yield fork(loadRates, true);

const wallet = yield call(Wallet.load);
Expand Down