Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

app.html 2.2 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
  1. <!DOCTYPE html>
  2. <html lang="en" class="h-full">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
  6. <script>
  7. if (
  8. localStorage.theme === "dark" ||
  9. (!("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches)
  10. ) {
  11. document.documentElement.classList.add("dark");
  12. }
  13. // For some reason, Sveltekit doesn't let us load env variables from .env here, so we load it from hooks.server.ts
  14. window.gaId = "%gaId%";
  15. window.gaIdDeprecated = "%gaIdDeprecated%";
  16. </script>
  17. %sveltekit.head%
  18. </head>
  19. <body data-sveltekit-preload-data="hover" class="h-full dark:bg-gray-900">
  20. <div id="app" class="contents h-full">%sveltekit.body%</div>
  21. <!-- Google Tag Manager -->
  22. <script>
  23. if (window.gaId) {
  24. const script = document.createElement("script");
  25. script.src = "https://www.googletagmanager.com/gtag/js?id=" + window.gaId;
  26. script.async = true;
  27. document.head.appendChild(script);
  28. window.dataLayer = window.dataLayer || [];
  29. function gtag() {
  30. dataLayer.push(arguments);
  31. }
  32. gtag("js", new Date());
  33. /// ^ See https://developers.google.com/tag-platform/gtagjs/install
  34. gtag("config", window.gaId);
  35. gtag("consent", "default", { ad_storage: "denied", analytics_storage: "denied" });
  36. /// ^ See https://developers.google.com/tag-platform/gtagjs/reference#consent
  37. /// TODO: ask the user for their consent and update this with gtag('consent', 'update')
  38. }
  39. </script>
  40. <!-- Google Analytics v3 (deprecated on 1 July 2023) -->
  41. <script>
  42. if (window.gaIdDeprecated) {
  43. (function (i, s, o, g, r, a, m) {
  44. i["GoogleAnalyticsObject"] = r;
  45. (i[r] =
  46. i[r] ||
  47. function () {
  48. (i[r].q = i[r].q || []).push(arguments);
  49. }),
  50. (i[r].l = 1 * new Date());
  51. (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
  52. a.async = 1;
  53. a.src = g;
  54. m.parentNode.insertBefore(a, m);
  55. })(
  56. window,
  57. document,
  58. "script",
  59. "https://www.google-analytics.com/analytics.js",
  60. "ganalytics"
  61. );
  62. ganalytics("create", window.gaIdDeprecated, "auto");
  63. ganalytics("send", "pageview");
  64. }
  65. </script>
  66. </body>
  67. </html>
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...