We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e075c6 commit a48c8b7Copy full SHA for a48c8b7
src/components/HallAnalytics.astro
@@ -4,13 +4,14 @@
4
const HALL_API_KEY = import.meta.env.HALL_API_KEY;
5
---
6
7
-{HALL_API_KEY && (
8
- <script define:vars={{ HALL_API_KEY }}>
+<script define:vars={{ apiKey: HALL_API_KEY || '' }}>
9
// Hall Analytics Client-Side Tracking
10
(function() {
11
'use strict';
12
13
- const HALL_API_KEY = HALL_API_KEY;
+ const HALL_API_KEY = apiKey;
+
14
+ console.log('[Hall Analytics] Initializing with API key:', HALL_API_KEY ? 'Present' : 'Missing');
15
16
if (!HALL_API_KEY) {
17
console.warn('[Hall Analytics] No API key found');
@@ -86,5 +87,4 @@ const HALL_API_KEY = import.meta.env.HALL_API_KEY;
86
87
});
88
89
})();
- </script>
90
-)}
+ </script>
0 commit comments