This repository has been archived on 2024-08-06. You can view files and clone it, but cannot push or open issues or pull requests.
readyornot/components/layout.tsx

36 lines
1.2 KiB
TypeScript
Raw Permalink Normal View History

2022-12-03 20:02:18 +00:00
import Script from 'next/script';
import React from 'react';
import Sidebar from './sidebar';
import styles from '/styles/ReadyOrNot.module.css';
const LayoutReadyOrNot = ({ children }: { children: React.ReactNode }) => {
return (
<div className={styles.page}>
<Script id="matomo_analytics">
{`
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
2023-01-14 20:09:01 +00:00
_paq.push(["setCookieDomain", "readyornot.neshweb.net"]);
2022-12-03 20:02:18 +00:00
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
2023-01-14 20:09:01 +00:00
var u="//tracking.neshweb.net/";
2022-12-03 20:02:18 +00:00
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '2']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
`}
</Script>
<Sidebar />
<main className={styles.main}>
{children}
</main>
</div>
);
}
export default LayoutReadyOrNot;