Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions scripts/build-site.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ const SITE_NAME = "CoreVideo";
// Cloudflare hosts. The token is public by design (it ships in every page).
const ANALYTICS_BEACON =
` <script defer src="https://static.cloudflareinsights.com/beacon.min.js" data-cf-beacon='{"token": "606f185a54e7489bb11a93235343469b"}'></script>\n`;
// Initialize the data layer before loading the container. The site's CSP
// requires the initializer to be served as a separate script.
const GOOGLE_TAG_MANAGER = ` <script src="/assets/google-tag-manager.js"></script>
<script async src="https://www.googletagmanager.com/gtm.js?id=GTM-PSHZHBGZ"></script>`;
const OG_IMAGE = `${PRIMARY_ORIGIN}/assets/corevideo-share.jpg`;
const OG_IMAGE_ALT =
"CoreVideo - Zoom participant video and audio as native OBS Studio sources";
Expand Down Expand Up @@ -923,6 +927,7 @@ function layout(page, content, options = {}) {
<html lang="en">
<head>
<meta charset="utf-8">
${GOOGLE_TAG_MANAGER}
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${escapeHtml(fullTitle)}</title>
<meta name="description" content="${escapeHtml(page.description)}">
Expand Down Expand Up @@ -1310,6 +1315,7 @@ const DOCS_DESCRIPTION =
const DOCS_CANONICAL = canonicalUrl("documentation/index.html");

const docsHtml = fs.readFileSync(path.join(docsDir, "index.html"), "utf8")
.replace(/(<meta charset="UTF-8"\s*\/>)/i, `$1\n${GOOGLE_TAG_MANAGER}`)
.replaceAll("iamfatness.github.io/CoreVideo", publicDocumentationUrl
? new URL("/documentation", publicDocumentationUrl).host + "/documentation"
: "CoreVideo documentation")
Expand Down Expand Up @@ -1355,6 +1361,11 @@ writeText(
fs.readFileSync(path.join(siteAssetsDir, "docs-init.js"), "utf8"),
);

writeText(
"assets/google-tag-manager.js",
fs.readFileSync(path.join(siteAssetsDir, "google-tag-manager.js"), "utf8"),
);

// Bundled application fonts (Space Grotesk + IBM Plex Mono), self-hosted so
// the CSP font-src 'self' policy allows them.
const fontsSource = path.join(siteAssetsDir, "fonts");
Expand Down
5 changes: 5 additions & 0 deletions site-assets/google-tag-manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
window.dataLayer = window.dataLayer || [];
function gtag() {
window.dataLayer.push(arguments);
}
gtag('js', new Date());
5 changes: 4 additions & 1 deletion site-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { handleReviewFeedback } from './review-feedback.js';

const SECURITY_HEADERS = {
"content-security-policy":
"default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; script-src 'self' https://cdn.jsdelivr.net https://static.cloudflareinsights.com; connect-src 'self' https://cloudflareinsights.com; font-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'",
"default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; " +
"script-src 'self' https://cdn.jsdelivr.net https://static.cloudflareinsights.com https://www.googletagmanager.com; " +
"connect-src 'self' https://cloudflareinsights.com https://www.googletagmanager.com https://*.google-analytics.com https://*.google.com; " +
"font-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'",
"referrer-policy": "strict-origin-when-cross-origin",
"x-content-type-options": "nosniff",
};
Expand Down
10 changes: 9 additions & 1 deletion wiki/Privacy-Policy.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Privacy Policy

_Last updated: September 2026_
_Last updated: November 2026_

## Overview

Expand Down Expand Up @@ -109,6 +109,14 @@ The documentation site at `corevideo.io` is served through Cloudflare and source
- [Cloudflare Privacy Policy](https://www.cloudflare.com/privacypolicy/)
- [GitHub Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement)

### Google Analytics (Website)

The public pages on `corevideo.io` use Google Analytics through Google Tag
Manager to measure site usage, including page views. Google Analytics may use
cookies to distinguish visits. See [how Google uses information from sites that
use its services](https://policies.google.com/technologies/partner-sites) and the
[Google Analytics opt-out browser add-on](https://tools.google.com/dlpage/gaoptout).

---

## Data Retention
Expand Down
Loading