diff --git a/src/App.js b/src/App.js index 59c9fa6d577..2b2f9beea9a 100644 --- a/src/App.js +++ b/src/App.js @@ -8,6 +8,7 @@ import React, { Component, createRef } from 'react'; import { AppRegistry, AppState, + Dimensions, InteractionManager, Linking, LogBox, @@ -273,6 +274,15 @@ class App extends Component { mmkv.set(STORAGE_IDS.FIRST_APP_LAUNCH, true); } else if (mmkv.getBoolean(STORAGE_IDS.FIRST_APP_LAUNCH)) { mmkv.set(STORAGE_IDS.FIRST_APP_LAUNCH, false); + // track device dimensions + const screenWidth = Dimensions.get('screen').width; + const screenHeight = Dimensions.get('screen').height; + const screenScale = Dimensions.get('screen').scale; + analytics.identify(storedIdentifier, { + screenHeight, + screenWidth, + screenScale, + }); } }; diff --git a/src/navigation/onNavigationStateChange.js b/src/navigation/onNavigationStateChange.js index 980e934255f..07bdd0c03ad 100644 --- a/src/navigation/onNavigationStateChange.js +++ b/src/navigation/onNavigationStateChange.js @@ -154,8 +154,6 @@ export function onNavigationStateChange(currentState) { } sentryUtils.addNavBreadcrumb(prevRouteName, routeName, paramsToTrack); - return android - ? paramsToTrack && analytics.screen(routeName, paramsToTrack) - : analytics.screen(routeName, paramsToTrack); + return analytics.screen(routeName, paramsToTrack); } }