Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop matomo tracking #910

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 12 additions & 28 deletions components/Layout.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { MatomoProvider, createInstance } from '@datapunt/matomo-tracker-react'
import { theme } from 'ooni-components'
import PropTypes from 'prop-types'
import React, { useEffect } from 'react'
import React from 'react'
import { ThemeProvider, createGlobalStyle } from 'styled-components'

import { getDirection } from 'components/withIntl'
Expand Down Expand Up @@ -46,37 +45,22 @@ const GlobalStyle = createGlobalStyle`
}
`

const matomoInstance = createInstance({
urlBase: 'https://matomo.ooni.org/',
siteId: 2,
trackerUrl: 'https://matomo.ooni.org/matomo.php',
srcUrl: 'https://matomo.ooni.org/matomo.js',
configurations: {
disableCookies: true
}
})

const Layout = ({ children, disableFooter = false }) => {
const { locale } = useIntl()
useEffect(() => {
matomoInstance.trackPageView()
}, [])

return (
<MatomoProvider value={matomoInstance}>
<ThemeProvider theme={theme}>
<UserProvider>
<GlobalStyle direction={getDirection(locale)} />
<div className="site">
<Header />
<div className="content">
{ children }
</div>
{!disableFooter && <Footer />}
<ThemeProvider theme={theme}>
<UserProvider>
<GlobalStyle direction={getDirection(locale)} />
<div className="site">
<Header />
<div className="content">
{ children }
</div>
</UserProvider>
</ThemeProvider>
</MatomoProvider>
{!disableFooter && <Footer />}
</div>
</UserProvider>
</ThemeProvider>
)
}

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"repository": "https://github.com/ooni/explorer",
"dependencies": {
"@cassiozen/usestatemachine": "^1.0.1",
"@datapunt/matomo-tracker-react": "^0.5.1",
"@hookform/resolvers": "^3.3.4",
"@nivo/bar": "^0.80.0",
"@nivo/calendar": "^0.80.0",
Expand Down
12 changes: 0 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1106,18 +1106,6 @@
debug "^3.1.0"
lodash.once "^4.1.1"

"@datapunt/matomo-tracker-js@^0.5.1":
version "0.5.1"
resolved "https://registry.yarnpkg.com/@datapunt/matomo-tracker-js/-/matomo-tracker-js-0.5.1.tgz#92a746ffa421f91b3a59fefce707d45ca22be96b"
integrity sha512-9/MW9vt/BA5Db7tO6LqCeQKtuvBNjyq51faF3AzUmPMlYsJCnASIxcut3VqJKiribhUoey7aYbPIYuj9x4DLPA==

"@datapunt/matomo-tracker-react@^0.5.1":
version "0.5.1"
resolved "https://registry.yarnpkg.com/@datapunt/matomo-tracker-react/-/matomo-tracker-react-0.5.1.tgz#d7a4e62b23610eab2b7513d4df41d500291aaa53"
integrity sha512-lrNYM9hFL6XK0VAdtMb7MwZrLWhaAconx4c7gOGAMvoWuoVm+ZZIYFuKtfYdYMeBf0avxWtmKRwjZEg7T8jV2A==
dependencies:
"@datapunt/matomo-tracker-js" "^0.5.1"

"@emotion/babel-plugin@^11.11.0":
version "11.11.0"
resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz#c2d872b6a7767a9d176d007f5b31f7d504bb5d6c"
Expand Down
Loading