Skip to content

Commit

Permalink
add: analyticsprovider for goodid (#4332)
Browse files Browse the repository at this point in the history
* add: analyticsprovider for goodid

* bump gd sdk's for analytics and style fixes
  • Loading branch information
L03TJ3 authored Nov 27, 2024
1 parent 7210a3c commit 2071e0e
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 247 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@
"@ethersproject/wallet": "^5.7.0",
"@expo/react-native-action-sheet": "^3.9.0",
"@fingerprintjs/fingerprintjs-pro": "^3.8.1",
"@gooddollar/good-design": "0.1.60-beta.47071d6a",
"@gooddollar/good-design": "0.4.1-beta.beeff9d3",
"@gooddollar/goodcontracts": "^2.6.2",
"@gooddollar/goodprotocol": "^2.0.24",
"@gooddollar/react-native-facetec": "^1.0.45",
"@gooddollar/react-native-side-menu": "^2.0.2",
"@gooddollar/web3sdk-v2": "0.2.35-beta.47071d6a",
"@gooddollar/web3sdk-v2": "0.4.1-beta.beeff9d3",
"@hcaptcha/react-hcaptcha": "^1.6.0",
"@indexeddbshim/indexeddbshim": "^6.5.0",
"@lingui/react": "^3.13.0",
Expand All @@ -93,12 +93,12 @@
"@react-native-community/netinfo": "^6.0.2",
"@react-native-community/push-notification-ios": "^1.10.1",
"@react-native-community/toolbar-android": "^0.2.1",
"@react-native-firebase/analytics": "^12.8.0",
"@react-native-firebase/analytics": "16.7",
"@react-native-firebase/app": "^12.8.0",
"@react-navigation/core": "^3.5.1",
"@react-navigation/web": "^1.0.0-alpha.9",
"@sentry/browser": "^7.86.0",
"@sentry/react-native": "^3.2.3",
"@sentry/react-native": "5.17.0",
"@snapshot-labs/snapshot.js": "^0.4.25",
"@textile/crypto": "^4.1.1",
"@textile/threaddb": "^0.1.0",
Expand Down
14 changes: 14 additions & 0 deletions src/lib/analytics/GoodIdAnalytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { osName, osVersion } from 'mobile-device-detect'
import { version } from '../../../package.json'

export const analyticsConfig = {
google: { enabled: true },
amplitude: { apiKey: process.env.REACT_APP_AMPLITUDE_API_KEY, enabled: true },
}

export const appProps = {
env: '',
version: version,
osVersion: `${osName} ${osVersion}`,
productEnv: 'gw',
}
11 changes: 8 additions & 3 deletions src/mainApp/AppHolder.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
// @flow
import { ActionSheetProvider } from '@expo/react-native-action-sheet'
import React from 'react'
import { AnalyticsProvider } from '@gooddollar/web3sdk-v2'

import '../lib/shim'

import LanguageProvider from '../language/i18n'
import { appProps, analyticsConfig as config } from '../lib/analytics/GoodIdAnalytics'
import AppHot from './AppHot'

const AppHolder = () => (
<LanguageProvider>
<ActionSheetProvider>
<AppHot />
</ActionSheetProvider>
<AnalyticsProvider {...{ config, appProps }}>
<ActionSheetProvider>
<AppHot />
</ActionSheetProvider>
</AnalyticsProvider>
</LanguageProvider>
)

Expand Down
Loading

0 comments on commit 2071e0e

Please sign in to comment.