Skip to content

Commit

Permalink
Add Matomo and chat scripts in index
Browse files Browse the repository at this point in the history
  • Loading branch information
louptheron committed Apr 9, 2024
1 parent ae5c6ec commit ed1ec0e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
26 changes: 26 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@
<meta name="theme-color" content="#000000" />
<meta name="description" content="MonitorFish" />
<title>MonitorFish</title>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://audience-sites.e2.rie.gouv.fr/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '1685']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand All @@ -19,6 +34,17 @@
<script>
globalThis.import_meta_env = JSON.parse('"import_meta_env_placeholder"')
</script>
<!-- Matomo Tag Manager -->
<script>
var _mtm = window._mtm = window._mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='https://audience-sites.e2.rie.gouv.fr/js/container_JF5tSs4R.js'; s.parentNode.insertBefore(g,s);
</script>
<!-- End Matomo Tag Manager -->

<!-- This script is used to inject the chat -->
<script async src="https://embed.small.chat/T0176BBUCEQC01SV3W4464.js"></script>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
2 changes: 0 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ export function App({ auth }: AppProps) {
</AuthorizationContext.Provider>
</FrontendErrorBoundary>
</RsuiteCustomProvider>
{/* This script is used to inject the chat */}
<script async src="https://embed.small.chat/T0176BBUCEQC01SV3W4464.js" />
</ThemeProvider>
)
}

0 comments on commit ed1ec0e

Please sign in to comment.