Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add link-click metrics (#6934)

* Add link-click metrics

* Fix conditional

authored by

Paul Frazee and committed by
GitHub
0c71f819 79f807dc

+14
+10
src/lib/hooks/useOpenLink.ts
··· 2 2 import {Linking} from 'react-native' 3 3 import * as WebBrowser from 'expo-web-browser' 4 4 5 + import {logEvent} from '#/lib/statsig/statsig' 5 6 import { 6 7 createBskyAppAbsoluteUrl, 8 + isBskyAppUrl, 7 9 isBskyRSSUrl, 8 10 isRelativeUrl, 11 + toNiceDomain, 9 12 } from '#/lib/strings/url-helpers' 10 13 import {isNative} from '#/platform/detection' 11 14 import {useModalControls} from '#/state/modals' ··· 23 26 async (url: string, override?: boolean) => { 24 27 if (isBskyRSSUrl(url) && isRelativeUrl(url)) { 25 28 url = createBskyAppAbsoluteUrl(url) 29 + } 30 + 31 + if (!isBskyAppUrl(url)) { 32 + logEvent('link:clicked', { 33 + domain: toNiceDomain(url), 34 + url, 35 + }) 26 36 } 27 37 28 38 if (isNative && !url.startsWith('mailto:')) {
+4
src/lib/statsig/events.ts
··· 211 211 'starterPack:opened': { 212 212 starterPack: string 213 213 } 214 + 'link:clicked': { 215 + url: string 216 + domain: string 217 + } 214 218 215 219 'feed:interstitial:profileCard:press': {} 216 220 'feed:interstitial:feedCard:press': {}