Skip to content
Snippets Groups Projects
Commit e44c8669 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

url for alpha

parent 94fc5bbd
No related branches found
No related tags found
1 merge request!624Feat/us780 matomo opt out
...@@ -19,6 +19,7 @@ const stackProvidedLibsConfig = { ...@@ -19,6 +19,7 @@ const stackProvidedLibsConfig = {
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'), 'process.env.NODE_ENV': JSON.stringify('development'),
__IS_ALPHA__: true, __IS_ALPHA__: true,
__DEVELOPMENT__: true,
__STACK_ASSETS__: true, __STACK_ASSETS__: true,
__PIWIK_TRACKER_URL__: JSON.stringify('http://localhost:9800/'), __PIWIK_TRACKER_URL__: JSON.stringify('http://localhost:9800/'),
__PIWIK_SITEID__: 1, __PIWIK_SITEID__: 1,
......
...@@ -23,7 +23,7 @@ export const App = ({ tracker }: AppProps) => { ...@@ -23,7 +23,7 @@ export const App = ({ tracker }: AppProps) => {
(state: AppStore) => state.ecolyo.profile (state: AppStore) => state.ecolyo.profile
) )
const { termsStatus } = useSelector((state: AppStore) => state.ecolyo.global) const { termsStatus } = useSelector((state: AppStore) => state.ecolyo.global)
const isDev = new EnvironmentService().isDev() const isDev = new EnvironmentService().isLocal()
console.log(isDev) console.log(isDev)
......
import React from 'react' import React from 'react'
import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { useI18n } from 'cozy-ui/transpiled/react/I18n'
import './matomoOptOut.scss' import './matomoOptOut.scss'
import EnvironmentService from '../../services/environment.service'
export const MatomoOptOut: React.FC = () => { export const MatomoOptOut: React.FC = () => {
const { t } = useI18n() const { t } = useI18n()
const isDev = new EnvironmentService().isLocal()
const baseUrl = isDev
? 'http://localhost:9800'
: 'https://statweb.grandlyon.com'
return ( return (
<div className="matomo-opt-out-container"> <div className="matomo-opt-out-container">
<div className="matomo-opt-out"> <div className="matomo-opt-out">
...@@ -12,7 +17,7 @@ export const MatomoOptOut: React.FC = () => { ...@@ -12,7 +17,7 @@ export const MatomoOptOut: React.FC = () => {
</div> </div>
<iframe <iframe
style={{ height: '430px' }} style={{ height: '430px' }}
src="http://localhost:9800/index.php?module=CoreAdminHome&action=optOut&language=fr&backgroundColor=121212&fontColor=e0e0e0&fontSize=&fontFamily=Lato" src={`${baseUrl}/index.php?module=CoreAdminHome&action=optOut&language=fr&backgroundColor=121212&fontColor=e0e0e0&fontSize=&fontFamily=Lato`}
></iframe> ></iframe>
</div> </div>
</div> </div>
......
...@@ -23,7 +23,7 @@ export default class EnvironmentService { ...@@ -23,7 +23,7 @@ export default class EnvironmentService {
} }
} }
public isDev() { public isLocal() {
return __DEVELOPMENT__ return __DEVELOPMENT__
} }
} }
...@@ -97,7 +97,6 @@ export default class MatomoTracker { ...@@ -97,7 +97,6 @@ export default class MatomoTracker {
} }
track(loc: Location) { track(loc: Location) {
console.log(loc)
if (typeof window === 'undefined') { if (typeof window === 'undefined') {
return return
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment