-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
394 lines (352 loc) · 16.3 KB
/
index.html
File metadata and controls
394 lines (352 loc) · 16.3 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>techno.dog - Global Techno Culture Archive | Artists, Festivals, Venues</title>
<meta name="description" content="Open-source archive of underground techno culture — artists, labels, festivals, venues, gear, and the ideas that shaped the sound. Community-built. Strictly non-commercial." />
<meta name="author" content="techno.dog" />
<meta name="keywords" content="techno music, electronic music, techno festivals, techno artists, techno clubs, techno labels, DJ, underground music, Detroit techno, Berlin techno" />
<link rel="canonical" href="https://techno.dog" />
<!-- Font Preloading for Performance -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet" />
<!-- Open Graph -->
<meta property="og:url" content="https://techno.dog" />
<meta property="og:title" content="techno.dog - Global Techno Culture Archive" />
<meta property="og:description" content="Discover the global techno archive. Artists, festivals, venues, labels, and history from Detroit to Tbilisi." />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://techno.dog/og-image.png" />
<meta property="og:locale" content="en_US" />
<meta property="og:site_name" content="techno.dog" />
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:url" content="https://techno.dog" />
<meta name="twitter:title" content="techno.dog - Global Techno Culture Archive" />
<meta name="twitter:description" content="Discover the global techno archive. Artists, festivals, venues, labels, and history." />
<meta name="twitter:image" content="https://techno.dog/og-image.png" />
<!-- Google Search Console Verification -->
<meta name="google-site-verification" content="Pz5JPf20fLEWalmMX3QwvDBty9k0Wq0V5qjlW0sE87w" />
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- 📍 Google Consent Mode v2 (BEFORE any Google scripts) -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// Consent Mode v2 - Default to denied until user provides consent
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'functionality_storage': 'granted',
'personalization_storage': 'denied',
'security_storage': 'granted',
'wait_for_update': 500
});
</script>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- 📍 Musikaze Pro Consent Manager & Analytics -->
<!-- Data flows to: musikazepro.app for consent & behavior analytics -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<link rel="preconnect" href="https://csqipkrgfkmqeyzdhmpy.supabase.co" crossorigin />
<link rel="preconnect" href="https://musikazepro.app" crossorigin />
<script
src="https://csqipkrgfkmqeyzdhmpy.supabase.co/functions/v1/consent-sdk?site=techno-dog&lang=en&theme=dark&position=bottom&color=%23fa0000"
data-site-id="techno-dog"
data-analytics="true"
data-behavior="true"
data-endpoint="https://musikazepro.app/api/collect"
async
></script>
<!-- Google Tag Manager -->
<script>
window.dataLayer.push({
'gtm.start': new Date().getTime(),
'event': 'gtm.js',
'site_name': 'techno.dog',
'site_version': '2.0',
'environment': 'production',
'default_currency': 'EUR',
'content_language': 'en'
});
</script>
<script>(function(w,d,s,l,i){var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-532T46V5');</script>
<!-- End Google Tag Manager -->
<!-- Google Analytics 4 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-1EMPVR3WST"></script>
<script>
gtag('js', new Date());
// GA4 configuration - Enhanced Measurement enabled
gtag('config', 'G-1EMPVR3WST', {
'send_page_view': true, // CRITICAL: Enable initial page view
'cookie_flags': 'SameSite=None;Secure',
'allow_google_signals': true,
'allow_ad_personalization_signals': true,
'page_location': window.location.href,
'page_title': document.title,
'linker': {
'domains': ['techno.dog'],
'accept_incoming': true
},
'custom_map': {
'dimension1': 'content_type',
'dimension2': 'content_group',
'dimension3': 'user_type',
'dimension4': 'device_category',
'metric1': 'scroll_depth',
'metric2': 'engagement_time'
}
});
// Debug mode for development
if (window.location.hostname === 'localhost') {
gtag('config', 'G-1EMPVR3WST', { 'debug_mode': true });
}
</script>
<!-- End Google Analytics 4 -->
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-532T46V5"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<!-- ═══════════════════════════════════════════════════════════════ -->
<!-- 📍 Unified Consent & Analytics Synchronization Layer -->
<!-- Synchronizes: Musikaze Pro SDK ↔ React ↔ Google ↔ musikazepro.app -->
<!-- ═══════════════════════════════════════════════════════════════ -->
<script>
(function() {
var MZK_KEY = 'mzk_consent';
var LEGACY_KEY = 'technodog_consent_preferences';
var SITE_ID = 'techno-dog';
var MZK_ENDPOINT = 'https://musikazepro.app/api/collect';
var lastProcessedEvent = null;
var sessionId = null;
// Generate or retrieve session ID
function getSessionId() {
if (sessionId) return sessionId;
sessionId = sessionStorage.getItem('mzk_session_id');
if (!sessionId) {
sessionId = 'mzk_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);
sessionStorage.setItem('mzk_session_id', sessionId);
}
return sessionId;
}
// Helper: Send data to Musikaze Pro
function sendToMusikazePro(eventType, data) {
try {
var payload = {
site_id: SITE_ID,
session_id: getSessionId(),
event_type: eventType,
timestamp: new Date().toISOString(),
url: window.location.href,
path: window.location.pathname,
referrer: document.referrer,
user_agent: navigator.userAgent,
screen: { w: screen.width, h: screen.height },
viewport: { w: window.innerWidth, h: window.innerHeight },
data: data
};
// Use sendBeacon for reliability, fallback to fetch
if (navigator.sendBeacon) {
navigator.sendBeacon(MZK_ENDPOINT, JSON.stringify(payload));
} else {
fetch(MZK_ENDPOINT, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload),
keepalive: true
}).catch(function() {});
}
} catch (e) {
// Silent fail - don't break the page
}
}
// Helper: Update Google Consent Mode
function updateGoogleConsent(consent) {
gtag('consent', 'update', {
'analytics_storage': consent.analytics ? 'granted' : 'denied',
'ad_storage': consent.marketing ? 'granted' : 'denied',
'ad_user_data': consent.marketing ? 'granted' : 'denied',
'ad_personalization': consent.marketing ? 'granted' : 'denied',
'personalization_storage': consent.personalization ? 'granted' : 'denied'
});
}
// Helper: Push to dataLayer
function pushToDataLayer(consent) {
dataLayer.push({
'event': 'consent_update',
'consent_analytics': consent.analytics,
'consent_marketing': consent.marketing,
'consent_essential': true,
'consent_personalization': consent.personalization || false
});
}
// Helper: Send page view if analytics enabled
function sendPageViewIfAnalytics(consent) {
if (consent.analytics) {
gtag('event', 'page_view', {
'page_location': window.location.href,
'page_path': window.location.pathname,
'page_title': document.title,
'consent_granted': true
});
// Also send to Musikaze Pro
sendToMusikazePro('page_view', {
title: document.title,
consent: consent
});
}
}
// Listen to mzk:consent:change from ANY source (SDK or React)
window.addEventListener('mzk:consent:change', function(e) {
var consent = e.detail.consent || {};
var source = e.detail.source || 'unknown';
var eventKey = JSON.stringify(consent) + source;
// Prevent duplicate processing
if (lastProcessedEvent === eventKey) return;
lastProcessedEvent = eventKey;
// Update Google Consent Mode
updateGoogleConsent(consent);
// Push to dataLayer
pushToDataLayer(consent);
// Send consent event to Musikaze Pro
sendToMusikazePro('consent_update', {
consent: consent,
source: source
});
// Send page view if analytics was just granted
sendPageViewIfAnalytics(consent);
// Sync to both storage systems (ensures both are in sync)
try {
var mzkData = {
preferences: {
essential: true,
analytics: consent.analytics || false,
marketing: consent.marketing || false,
personalization: consent.personalization || false
},
version: '1.0',
updatedAt: new Date().toISOString(),
source: source
};
localStorage.setItem(MZK_KEY, JSON.stringify(mzkData));
localStorage.setItem(LEGACY_KEY, JSON.stringify({
preferences: mzkData.preferences,
consentVersion: '1.0',
updatedAt: new Date().toISOString()
}));
} catch (err) {
// Storage error - ignore
}
});
// Track page views for SPA navigation
window.addEventListener('popstate', function() {
var consent = null;
try {
var stored = localStorage.getItem(MZK_KEY);
if (stored) {
consent = JSON.parse(stored).preferences;
}
} catch (e) {}
if (consent && consent.analytics) {
sendToMusikazePro('page_view', {
title: document.title,
type: 'spa_navigation'
});
}
});
// On page load: Check for existing consent and initialize
document.addEventListener('DOMContentLoaded', function() {
try {
var mzkStored = localStorage.getItem(MZK_KEY);
var legacyStored = localStorage.getItem(LEGACY_KEY);
var consent = null;
// Priority: Musikaze Pro SDK storage
if (mzkStored) {
var mzkParsed = JSON.parse(mzkStored);
if (mzkParsed.preferences) {
consent = mzkParsed.preferences;
}
}
// Fallback: Legacy storage
else if (legacyStored) {
var legacyParsed = JSON.parse(legacyStored);
if (legacyParsed.preferences) {
consent = legacyParsed.preferences;
// Sync to Musikaze Pro storage
localStorage.setItem(MZK_KEY, JSON.stringify({
preferences: consent,
version: '1.0',
updatedAt: new Date().toISOString(),
source: 'legacy_migration'
}));
}
}
// Apply existing consent to Google
if (consent && (consent.analytics || consent.marketing)) {
updateGoogleConsent(consent);
// Send session start to Musikaze Pro
sendToMusikazePro('session_start', {
consent: consent,
returning: !!mzkStored
});
}
} catch (e) {
// Ignore parse errors
}
});
// Track scroll depth (if analytics consent granted)
var maxScroll = 0;
var scrollThresholds = [25, 50, 75, 90];
var scrollSent = {};
window.addEventListener('scroll', function() {
try {
var consent = null;
var stored = localStorage.getItem(MZK_KEY);
if (stored) consent = JSON.parse(stored).preferences;
if (!consent || !consent.analytics) return;
var scrollHeight = document.documentElement.scrollHeight - window.innerHeight;
var scrollPercent = Math.round((window.scrollY / scrollHeight) * 100);
if (scrollPercent > maxScroll) {
maxScroll = scrollPercent;
scrollThresholds.forEach(function(threshold) {
if (scrollPercent >= threshold && !scrollSent[threshold]) {
scrollSent[threshold] = true;
sendToMusikazePro('scroll_depth', {
threshold: threshold,
max_scroll: maxScroll
});
}
});
}
} catch (e) {}
}, { passive: true });
// Track time on page (send on unload)
var pageLoadTime = Date.now();
window.addEventListener('beforeunload', function() {
try {
var consent = null;
var stored = localStorage.getItem(MZK_KEY);
if (stored) consent = JSON.parse(stored).preferences;
if (!consent || !consent.analytics) return;
var timeOnPage = Date.now() - pageLoadTime;
sendToMusikazePro('page_exit', {
time_on_page_ms: timeOnPage,
max_scroll: maxScroll
});
} catch (e) {}
});
})();
</script>
</body>
</html>