feat: add analytics

This commit is contained in:
Derrick Hammer 2023-08-13 15:45:41 -04:00
parent fc0c1a6dd5
commit 6fcce50dab
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 38 additions and 19 deletions

View File

@ -9,14 +9,14 @@ export interface Props {
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 charset="utf-8" /> <meta charset="utf-8"/>
<meta <meta
name="viewport" name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0" content="width=device-width, initial-scale=1.0, minimum-scale=1.0"
@ -25,14 +25,33 @@ const { view, title } = Astro.props;
name="description" name="description"
content="A platform, network and experience that allows you to control and own your online web, and access all of the possibilities Web3 has to offer. Join the open web." content="A platform, network and experience that allows you to control and own your online web, and access all of the possibilities Web3 has to offer. Join the open web."
/> />
<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 class="max-w-[1600px] mx-auto"> <!-- Matomo -->
<Navbar view={view} /> <script is:inline>
<main class={view + " space-y-40"}> var _paq = window._paq = window._paq || [];
<slot /> /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
</main> _paq.push(['trackPageView']);
{view !== "home" && <JoinCommunity />} _paq.push(['enableLinkTracking']);
<Footer /> (function () {
</body> var u = "//piwiki.lumeweb.com/";
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', '1']);
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 class="max-w-[1600px] mx-auto">
<Navbar view={view}/>
<main class={view + " space-y-40"}>
<slot/>
</main>
{view !== "home" &&
<JoinCommunity/>}
<Footer/>
</body>
</html> </html>