feat: add analytics

This commit is contained in:
Derrick Hammer 2023-08-13 15:47:18 -04:00
parent aa7c1411ae
commit b51847da06
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 36 additions and 17 deletions

View File

@ -4,28 +4,47 @@ import Navbar from '../components/Layout/Navbar/Navbar.jsx';
import Footer from '../components/Layout/Footer/Footer.astro'; import Footer from '../components/Layout/Footer/Footer.astro';
export interface Props { export interface Props {
view: string; view: string;
title: string; title: string;
} }
const { view, title } = Astro.props; const {view, title} = Astro.props;
--- ---
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>{title}</title> <title>{title}</title>
<meta <meta
name="description" name="description"
content="Access the open, user-owned web with Lume Web, and make it yours" content="Access the open, user-owned web with Lume Web, and make it yours"
/> />
<meta name="keywords" content="Web3 Extension, web3 browser, Lume Web, Web3, dWeb, p2p, handshake, eth, ethereum, ipfs, open web, privacy, decentralization, blockchain" /> <meta name="keywords"
</head> content="Web3 Extension, web3 browser, Lume Web, Web3, dWeb, p2p, handshake, eth, ethereum, ipfs, open web, privacy, decentralization, blockchain"/>
<body> <!-- Matomo -->
<Navbar view={view} client:load /> <script>
<main class={view}> var _paq = window._paq = window._paq || [];
<slot /> /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
</main> _paq.push(['trackPageView']);
<Footer /> _paq.push(['enableLinkTracking']);
</body> (function () {
var u = "//piwiki.lumeweb.com/";
_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>
<!-- End Matomo Code -->
</head>
<body>
<Navbar view={view} client:load/>
<main class={view}>
<slot/>
</main>
<Footer/>
</body>
</html> </html>