Skip to content

Commit

Permalink
revert layout update
Browse files Browse the repository at this point in the history
  • Loading branch information
MarBert committed Dec 20, 2024
1 parent 21c2e66 commit 69cd37f
Showing 1 changed file with 21 additions and 40 deletions.
61 changes: 21 additions & 40 deletions apps/nextjs-website/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,21 @@ import NextIntlContext from '@/components/atoms/NextIntlContext/NextIntlContext'
import ChatbotProvider from '@/components/organisms/ChatbotProvider/ChatbotProvider';

const 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://uqido.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '3']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='https://cdn.matomo.cloud/uqido.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
})();
`;

const MATOMO_ENV = `
var _mtm = window._mtm = window._mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
(function() {
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='https://cdn.matomo.cloud/uqido.matomo.cloud/container_50OlzmFz.js'; s.parentNode.insertBefore(g,s);
})();
`;

const MATOMO_PUSH = `
funtion matomoEvent() {
var _paq = window._paq = window._paq || [];
_paq.push(['trackEvent', 'Contact', 'Email Link Click', '[email protected]']);}
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://pagopa.matomo.cloud/";
_paq.push(["setTrackerUrl", u + "matomo.php"]);
_paq.push(["setSiteId", "8"]);
var d = document,
g = d.createElement("script"),
s = d.getElementsByTagName("script")[0];
g.async = true;
g.src = "//cdn.matomo.cloud/pagopa.matomo.cloud/matomo.js";
s.parentNode.insertBefore(g, s);
})();
`;

const titilliumWeb = Titillium_Web({
Expand Down Expand Up @@ -91,20 +80,12 @@ export default async function RootLayout({
<html lang='it' className={titilliumWeb.variable}>
<head>
{isProduction && (
<>
<Script
id='matomo'
key='script-matomo'
dangerouslySetInnerHTML={{ __html: MATOMO_SCRIPT }}
strategy='lazyOnload'
/>
<Script
id='matomoenv'
key='script-matomoenv'
dangerouslySetInnerHTML={{ __html: MATOMO_ENV }}
strategy='lazyOnload'
/>
</>
<Script
id='matomo'
key='script-matomo'
dangerouslySetInnerHTML={{ __html: MATOMO_SCRIPT }}
strategy='lazyOnload'
/>
)}
</head>
<ThemeRegistry options={{ key: 'mui' }}>
Expand Down

0 comments on commit 69cd37f

Please sign in to comment.