Add configurable Plausible analytics
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -130,6 +130,9 @@ const i18nPayload = JSON.stringify({ locale, catalog: clientCatalog(locale) }).r
|
||||
*/
|
||||
const imageUrl = new URL(image, site).href;
|
||||
|
||||
const plausibleUrl = import.meta.env.PLAUSIBLE_URL;
|
||||
const plausibleDomain = import.meta.env.PLAUSIBLE_DOMAIN;
|
||||
|
||||
/**
|
||||
* This page's JSON-LD, assembled here and nowhere else.
|
||||
*
|
||||
@@ -267,6 +270,9 @@ const noscriptMotion =
|
||||
{graph.length > 0 && (
|
||||
<script type="application/ld+json" is:inline set:html={serializeGraph(graph)} />
|
||||
)}
|
||||
{plausibleUrl && plausibleDomain && (
|
||||
<script is:inline defer data-domain={plausibleDomain} src={plausibleUrl}></script>
|
||||
)}
|
||||
</head>
|
||||
<body>
|
||||
{/*
|
||||
|
||||
Reference in New Issue
Block a user