about summary refs log tree commit diff
path: root/src/Navigation.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Navigation.tsx')
-rw-r--r--src/Navigation.tsx15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/Navigation.tsx b/src/Navigation.tsx
index 495435122..8c815a3fe 100644
--- a/src/Navigation.tsx
+++ b/src/Navigation.tsx
@@ -31,7 +31,7 @@ import {
 } from 'lib/routes/types'
 import {RouteParams, State} from 'lib/routes/types'
 import {bskyTitle} from 'lib/strings/headings'
-import {isAndroid, isNative} from 'platform/detection'
+import {isAndroid, isNative, isWeb} from 'platform/detection'
 import {PreferencesExternalEmbeds} from '#/view/screens/PreferencesExternalEmbeds'
 import {AppPasswords} from 'view/screens/AppPasswords'
 import {ModerationBlockedAccounts} from 'view/screens/ModerationBlockedAccounts'
@@ -49,6 +49,7 @@ import {
   StarterPackScreenShort,
 } from '#/screens/StarterPack/StarterPackScreen'
 import {Wizard} from '#/screens/StarterPack/Wizard'
+import {Referrer} from '../modules/expo-bluesky-swiss-army'
 import {init as initAnalytics} from './lib/analytics/analytics'
 import {useWebScrollRestoration} from './lib/hooks/useWebScrollRestoration'
 import {attachRouteToLogEvents, logEvent} from './lib/statsig/statsig'
@@ -769,6 +770,18 @@ function logModuleInitTime() {
     initMs,
   })
 
+  if (isWeb) {
+    Referrer.getReferrerInfoAsync().then(info => {
+      if (info && info.hostname !== 'bsky.app') {
+        logEvent('deepLink:referrerReceived', {
+          to: window.location.href,
+          referrer: info?.referrer,
+          hostname: info?.hostname,
+        })
+      }
+    })
+  }
+
   if (__DEV__) {
     // This log is noisy, so keep false committed
     const shouldLog = false