|
1 | 1 | --- |
2 | 2 | import '../styles/global.css'; |
| 3 | +// Self-hosted fonts: no request to Google before (or without) consent. |
| 4 | +import '@fontsource-variable/inter/opsz.css'; |
| 5 | +import '@fontsource/fira-code/400.css'; |
| 6 | +import '@fontsource/fira-code/500.css'; |
3 | 7 | import { readFileSync } from 'node:fs'; |
4 | 8 | import { join } from 'node:path'; |
5 | 9 |
|
@@ -208,12 +212,20 @@ const commandCards: CommandCard[] = [ |
208 | 212 | desc: 'Sits in front of a stream so you can see exactly what reaches Deepgram.', |
209 | 213 | lines: ['dg debug probe'] }, |
210 | 214 | ]; |
| 215 | +import ketchJs from '../consent/ketch.js?raw'; |
| 216 | +import consentTrackersJs from '../consent/trackers.js?raw'; |
211 | 217 | --- |
212 | 218 |
|
213 | | -<html lang="en" prefix="og: https://ogp.me/ns#"> |
| 219 | +<html lang="en" class="dark" prefix="og: https://ogp.me/ns#"> |
214 | 220 | <head> |
215 | 221 | <!-- ── Essentials ──────────────────────────────────────── --> |
216 | 222 | <meta charset="utf-8" /> |
| 223 | + <!-- |
| 224 | + Ketch consent manager plus the dgOnConsent / dgOnRevoke helpers, vendored |
| 225 | + from developers.deepgram.com (src/consent/SOURCE.json). Must stay the |
| 226 | + FIRST script in <head>: Heap and GA4 below wait for its consent. |
| 227 | + --> |
| 228 | + <script is:inline set:html={ketchJs}></script> |
217 | 229 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
218 | 230 | <meta name="generator" content={Astro.generator} /> |
219 | 231 | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
@@ -254,11 +266,6 @@ const commandCards: CommandCard[] = [ |
254 | 266 | <meta name="theme-color" content="#13ef95" /> |
255 | 267 | <meta name="msapplication-TileColor" content="#050506" /> |
256 | 268 |
|
257 | | - <!-- ── Fonts ──────────────────────────────────────────── --> |
258 | | - <link rel="preconnect" href="https://fonts.googleapis.com" /> |
259 | | - <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> |
260 | | - <link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;0,14..32,900&family=Fira+Code:wght@400;500&display=swap" rel="stylesheet" /> |
261 | | - |
262 | 269 | <!-- ── DNS prefetch ───────────────────────────────────── --> |
263 | 270 | <link rel="dns-prefetch" href="https://deepgram.com" /> |
264 | 271 | <link rel="dns-prefetch" href="https://developers.deepgram.com" /> |
@@ -438,20 +445,8 @@ const commandCards: CommandCard[] = [ |
438 | 445 | ] |
439 | 446 | })} /> |
440 | 447 |
|
441 | | - <!-- Heap Analytics — product analytics for cli.deepgram.com --> |
442 | | - <script is:inline> |
443 | | - window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.us.heap-api.com/js/heap-"+e+".js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a);for(var n=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","resetIdentity","removeEventProperty","setEventProperties","track","unsetEventProperty"],o=0;o<p.length;o++)heap[o]=n(p[o])}; |
444 | | - heap.load("765739241"); |
445 | | - </script> |
446 | | - |
447 | | - <!-- Google Analytics 4 — *.deepgram.com property (266000242 / 372400484) --> |
448 | | - <script is:inline async src="https://www.googletagmanager.com/gtag/js?id=G-TYPC1TBCKT"></script> |
449 | | - <script is:inline> |
450 | | - window.dataLayer = window.dataLayer || []; |
451 | | - function gtag(){dataLayer.push(arguments);} |
452 | | - gtag('js', new Date()); |
453 | | - gtag('config', 'G-TYPC1TBCKT'); |
454 | | - </script> |
| 448 | + <!-- Heap and Google Analytics 4 (G-TYPC1TBCKT), started only after Ketch grants targeted_advertising --> |
| 449 | + <script is:inline set:html={consentTrackersJs}></script> |
455 | 450 | </head> |
456 | 451 | <body class="bg-dg-black text-dg-text font-sans overflow-x-hidden" style="font-feature-settings: 'cv02','cv03','cv04','cv11';"> |
457 | 452 |
|
@@ -913,10 +908,14 @@ const commandCards: CommandCard[] = [ |
913 | 908 | </div> |
914 | 909 | <div class="pt-6 text-[11px] text-dg-pebble flex flex-col sm:flex-row justify-between gap-2" style="border-top: 1px solid #2c2c3330;"> |
915 | 910 | <span>© {new Date().getFullYear()} Deepgram, Inc. All rights reserved.</span> |
| 911 | + <!-- dg-consent.js mounts the "Your Privacy Choices" control here (Privacy Policy if Ketch is unavailable). --> |
| 912 | + <div id="fern-footer"></div> |
916 | 913 | </div> |
917 | 914 | </div> |
918 | 915 | </footer> |
919 | 916 |
|
| 917 | + <!-- Cookie consent banner and footer control, vendored from developers.deepgram.com. Loads no tracker. --> |
| 918 | + <script is:inline src="/consent/dg-consent.js" defer></script> |
920 | 919 | </body> |
921 | 920 | </html> |
922 | 921 |
|
|
0 commit comments