Skip to content

Commit

Permalink
Merge pull request #154 from dappforce/google-analytics
Browse files Browse the repository at this point in the history
Add google analytics
  • Loading branch information
olehmell authored Dec 19, 2023
2 parents b105ab0 + 8410d46 commit a17a8f8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"lodash.truncate": "^4.4.2",
"next": "11.1.4",
"next-themes": "^0.0.14",
"nextjs-google-analytics": "^2.3.3",
"nextjs-progressbar": "^0.0.16",
"node-html-markdown": "^1.2.0",
"qr-code-styling": "^1.6.0-rc.1",
Expand Down
3 changes: 0 additions & 3 deletions src/layout/ClientLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { LazyConnectionsProvider } from 'src/components/lazy-connection/LazyConn
import OnBoardingContextsWrapper from 'src/components/onboarding/contexts/OnBoardingContextsWrapper'
import { ResponsiveSizeProvider } from 'src/components/responsive'
import config from 'src/config'
import { initGa } from 'src/ga'
import { AuthProvider } from '../components/auth/AuthContext'
import { MyAccountsProvider } from '../components/auth/MyAccountsContext'
import { SubstrateProvider, SubstrateWebConsole } from '../components/substrate'
Expand All @@ -16,8 +15,6 @@ const ChatFloatingModal = dynamic(() => import('../components/chat/ChatFloatingM
ssr: false,
})

initGa(config.ga)

const ClientLayout: React.FunctionComponent = ({ children }) => {
return (
<ResponsiveSizeProvider>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import '@subsocial/definitions/interfaces/types-lookup'
import '@subsocial/definitions/interfaces/augment-types'
import '@subsocial/definitions/interfaces/augment-api'
import AnalyticProvider from 'src/providers/AnalyticContext'
import { GoogleAnalytics } from 'nextjs-google-analytics'

dayjs.extend(relativeTime)
dayjs.extend(localizedFormat)
Expand Down Expand Up @@ -71,6 +72,7 @@ function MyApp(props) {
/>
<Provider store={store}>
{/* <AdBlockModal /> */}
<GoogleAnalytics trackPageViews gaMeasurementId={config.ga.id} />
<AnalyticProvider>
<DfApolloProvider initialApolloState={pageProps.initialApolloState}>
<ThemeProvider defaultTheme={config.themeName}>
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6836,6 +6836,11 @@ fsevents@^2.1.2, fsevents@~2.3.1, fsevents@~2.3.2:
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==

fsevents@^2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==

function-bind@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
Expand Down Expand Up @@ -9934,6 +9939,13 @@ [email protected]:
"@next/swc-linux-x64-gnu" "11.1.4"
"@next/swc-win32-x64-msvc" "11.1.4"

nextjs-google-analytics@^2.3.3:
version "2.3.3"
resolved "https://registry.yarnpkg.com/nextjs-google-analytics/-/nextjs-google-analytics-2.3.3.tgz#8393804b89915b22d94e0fabb786bdd4012cb888"
integrity sha512-Y6sI6A7wt5dji8hYBnVkOh9LTyImSLFZXx3FpyQgVW7W4b4qEFHjH2u3fhDJsrRZeLlUGM8/RuHD/mhHc2Axfg==
optionalDependencies:
fsevents "^2.3.2"

nextjs-progressbar@^0.0.16:
version "0.0.16"
resolved "https://registry.yarnpkg.com/nextjs-progressbar/-/nextjs-progressbar-0.0.16.tgz#d2c1e54ffc2c6d52b64282c0d764a44241fbc36e"
Expand Down

0 comments on commit a17a8f8

Please sign in to comment.