Spaces:
Running
Running
Update index.html
Browse files- index.html +119 -585
index.html
CHANGED
@@ -1,598 +1,132 @@
|
|
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 |
-
.logo {
|
37 |
-
font-size: 28px;
|
38 |
-
font-weight: bold;
|
39 |
-
color: #1e3c72;
|
40 |
-
}
|
41 |
-
|
42 |
-
.nav {
|
43 |
-
display: flex;
|
44 |
-
gap: 30px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.nav a {
|
48 |
-
color: #333;
|
49 |
-
text-decoration: none;
|
50 |
-
font-weight: 500;
|
51 |
-
transition: color 0.3s;
|
52 |
-
}
|
53 |
-
|
54 |
-
.nav a:hover {
|
55 |
-
color: #1e3c72;
|
56 |
-
}
|
57 |
-
|
58 |
-
.main-container {
|
59 |
-
max-width: 1200px;
|
60 |
-
margin: 50px auto;
|
61 |
-
padding: 0 20px;
|
62 |
-
}
|
63 |
-
|
64 |
-
.hero-section {
|
65 |
-
background: white;
|
66 |
-
border-radius: 20px;
|
67 |
-
padding: 60px;
|
68 |
-
text-align: center;
|
69 |
-
box-shadow: 0 20px 60px rgba(0,0,0,0.1);
|
70 |
-
margin-bottom: 40px;
|
71 |
-
}
|
72 |
-
|
73 |
-
.hero-section h1 {
|
74 |
-
font-size: 48px;
|
75 |
-
color: #1e3c72;
|
76 |
-
margin-bottom: 20px;
|
77 |
-
}
|
78 |
-
|
79 |
-
.hero-section p {
|
80 |
-
font-size: 20px;
|
81 |
-
color: #666;
|
82 |
-
margin-bottom: 30px;
|
83 |
-
}
|
84 |
-
|
85 |
-
.tracking-status {
|
86 |
-
background: #e8f5e9;
|
87 |
-
border: 2px solid #4caf50;
|
88 |
-
border-radius: 10px;
|
89 |
-
padding: 20px;
|
90 |
-
margin: 20px 0;
|
91 |
-
}
|
92 |
-
|
93 |
-
.tracking-status h3 {
|
94 |
-
color: #2e7d32;
|
95 |
-
margin-bottom: 10px;
|
96 |
-
}
|
97 |
-
|
98 |
-
.info-grid {
|
99 |
-
display: grid;
|
100 |
-
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
101 |
-
gap: 20px;
|
102 |
-
margin-top: 40px;
|
103 |
-
}
|
104 |
-
|
105 |
-
.info-card {
|
106 |
-
background: white;
|
107 |
-
padding: 30px;
|
108 |
-
border-radius: 15px;
|
109 |
-
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
|
110 |
-
transition: transform 0.3s;
|
111 |
-
}
|
112 |
-
|
113 |
-
.info-card:hover {
|
114 |
-
transform: translateY(-5px);
|
115 |
-
}
|
116 |
-
|
117 |
-
.info-card h3 {
|
118 |
-
color: #1e3c72;
|
119 |
-
margin-bottom: 15px;
|
120 |
-
font-size: 24px;
|
121 |
-
}
|
122 |
-
|
123 |
-
.info-card p {
|
124 |
-
color: #666;
|
125 |
-
line-height: 1.6;
|
126 |
-
}
|
127 |
-
|
128 |
-
.status-indicator {
|
129 |
-
display: inline-flex;
|
130 |
-
align-items: center;
|
131 |
-
gap: 8px;
|
132 |
-
background: #f5f5f5;
|
133 |
-
padding: 8px 16px;
|
134 |
-
border-radius: 20px;
|
135 |
-
font-size: 14px;
|
136 |
-
}
|
137 |
-
|
138 |
-
.status-indicator.active {
|
139 |
-
background: #e8f5e9;
|
140 |
-
color: #2e7d32;
|
141 |
-
}
|
142 |
-
|
143 |
-
.status-dot {
|
144 |
-
width: 8px;
|
145 |
-
height: 8px;
|
146 |
-
border-radius: 50%;
|
147 |
-
background: #4caf50;
|
148 |
-
animation: pulse 2s infinite;
|
149 |
-
}
|
150 |
-
|
151 |
-
@keyframes pulse {
|
152 |
-
0% {
|
153 |
-
box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
|
154 |
-
}
|
155 |
-
70% {
|
156 |
-
box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
|
157 |
-
}
|
158 |
-
100% {
|
159 |
-
box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
-
.tracking-details {
|
164 |
-
background: #f8f9fa;
|
165 |
-
padding: 20px;
|
166 |
-
border-radius: 10px;
|
167 |
-
margin-top: 20px;
|
168 |
-
font-family: monospace;
|
169 |
-
font-size: 14px;
|
170 |
-
}
|
171 |
-
|
172 |
-
.tracking-details .row {
|
173 |
-
display: flex;
|
174 |
-
justify-content: space-between;
|
175 |
-
padding: 8px 0;
|
176 |
-
border-bottom: 1px solid #e0e0e0;
|
177 |
-
}
|
178 |
-
|
179 |
-
.tracking-details .row:last-child {
|
180 |
-
border-bottom: none;
|
181 |
-
}
|
182 |
-
|
183 |
-
.tracking-details .label {
|
184 |
-
font-weight: bold;
|
185 |
-
color: #555;
|
186 |
-
}
|
187 |
-
|
188 |
-
.tracking-details .value {
|
189 |
-
color: #1e3c72;
|
190 |
-
}
|
191 |
-
|
192 |
-
.buttons {
|
193 |
-
display: flex;
|
194 |
-
gap: 15px;
|
195 |
-
margin-top: 30px;
|
196 |
-
justify-content: center;
|
197 |
-
flex-wrap: wrap;
|
198 |
-
}
|
199 |
-
|
200 |
-
button {
|
201 |
-
padding: 12px 30px;
|
202 |
-
background: #1e3c72;
|
203 |
-
color: white;
|
204 |
-
border: none;
|
205 |
-
border-radius: 8px;
|
206 |
-
font-size: 16px;
|
207 |
-
font-weight: 500;
|
208 |
-
cursor: pointer;
|
209 |
-
transition: all 0.3s;
|
210 |
-
}
|
211 |
-
|
212 |
-
button:hover {
|
213 |
-
background: #2a5298;
|
214 |
-
transform: translateY(-2px);
|
215 |
-
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
|
216 |
-
}
|
217 |
-
|
218 |
-
button.secondary {
|
219 |
-
background: #757575;
|
220 |
-
}
|
221 |
-
|
222 |
-
button.secondary:hover {
|
223 |
-
background: #616161;
|
224 |
-
}
|
225 |
-
|
226 |
-
.footer {
|
227 |
-
text-align: center;
|
228 |
-
padding: 40px 20px;
|
229 |
-
color: white;
|
230 |
-
margin-top: 60px;
|
231 |
-
}
|
232 |
|
233 |
-
.
|
234 |
-
background: #fff3cd;
|
235 |
-
border: 1px solid #ffeaa7;
|
236 |
-
padding: 15px;
|
237 |
-
border-radius: 8px;
|
238 |
-
margin: 20px 0;
|
239 |
-
text-align: center;
|
240 |
-
}
|
241 |
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
<nav class="nav">
|
255 |
-
<a href="#home">ํ</a>
|
256 |
-
<a href="#about">์๊ฐ</a>
|
257 |
-
<a href="#tracking">์ถ์ ์ ๋ณด</a>
|
258 |
-
<a href="#contact">๋ฌธ์</a>
|
259 |
-
</nav>
|
260 |
-
</div>
|
261 |
-
</header>
|
262 |
-
|
263 |
-
<div class="main-container">
|
264 |
-
<section class="hero-section">
|
265 |
-
<h1>EV Cook ์ถ์ ๋ฐ๋ชจ ์ฌ์ดํธ</h1>
|
266 |
-
<p>์ด ์ฌ์ดํธ๋ ๋ฐฉ๋ฌธ์ ์ถ์ ์์คํ
์ด ํ์ฑํ๋์ด ์์ต๋๋ค</p>
|
267 |
-
|
268 |
-
<div class="tracking-status">
|
269 |
-
<h3>๐ ์ถ์ ์ํ</h3>
|
270 |
-
<div class="status-indicator active">
|
271 |
-
<span class="status-dot"></span>
|
272 |
-
<span>์ถ์ ํ์ฑํ๋จ</span>
|
273 |
-
</div>
|
274 |
-
|
275 |
-
<div class="tracking-details">
|
276 |
-
<div class="row">
|
277 |
-
<span class="label">Device ID:</span>
|
278 |
-
<span class="value" id="deviceId">๋ก๋ฉ ์ค...</span>
|
279 |
-
</div>
|
280 |
-
<div class="row">
|
281 |
-
<span class="label">์ถ์ ์๋ฒ:</span>
|
282 |
-
<span class="value">seawolf2357-evcook.hf.space</span>
|
283 |
-
</div>
|
284 |
-
<div class="row">
|
285 |
-
<span class="label">์ฌ์ดํธ ID:</span>
|
286 |
-
<span class="value">38e0a883</span>
|
287 |
-
</div>
|
288 |
-
<div class="row">
|
289 |
-
<span class="label">์ถ์ ์์:</span>
|
290 |
-
<span class="value" id="trackingStart">-</span>
|
291 |
-
</div>
|
292 |
-
</div>
|
293 |
-
</div>
|
294 |
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
<button onclick="viewDetails()" class="secondary">๐ ์์ธ ์ ๋ณด</button>
|
299 |
-
</div>
|
300 |
-
</section>
|
301 |
-
|
302 |
-
<div class="info-grid">
|
303 |
-
<div class="info-card">
|
304 |
-
<h3>๐ ์ค์๊ฐ ์ถ์ </h3>
|
305 |
-
<p>ํ์ด์ง ๋ฐฉ๋ฌธ, ํด๋ฆญ, ์คํฌ๋กค ๋ฑ ๋ชจ๋ ์ฌ์ฉ์ ํ๋์ด ์ค์๊ฐ์ผ๋ก ์ถ์ ๋ฉ๋๋ค. ๊ฐ๋ฐ์ ๋๊ตฌ ์ฝ์์์ ์ถ์ ๋ก๊ทธ๋ฅผ ํ์ธํ ์ ์์ต๋๋ค.</p>
|
306 |
-
</div>
|
307 |
-
<div class="info-card">
|
308 |
-
<h3>๐ ๊ฐ์ธ์ ๋ณด ๋ณดํธ</h3>
|
309 |
-
<p>๋๋ฐ์ด์ค ID๋ ๋ธ๋ผ์ฐ์ ์ ๋ณด๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์์ฑ๋๋ฉฐ, ๊ฐ์ธ์ ์๋ณํ ์ ์๋ ์ ๋ณด๋ ์์งํ์ง ์์ต๋๋ค.</p>
|
310 |
-
</div>
|
311 |
-
<div class="info-card">
|
312 |
-
<h3>๐ ๋ถ์ ๋์๋ณด๋</h3>
|
313 |
-
<p>์์ง๋ ๋ฐ์ดํฐ๋ ์ถ์ ์๋ฒ์ ๋์๋ณด๋์์ ์ค์๊ฐ์ผ๋ก ํ์ธํ ์ ์์ต๋๋ค.</p>
|
314 |
-
</div>
|
315 |
-
</div>
|
316 |
-
|
317 |
-
<div class="console-hint">
|
318 |
-
๐ก <strong>๊ฐ๋ฐ์ ๋๊ตฌ ํ์ฉ:</strong> <code>F12</code>๋ฅผ ๋๋ฌ Console ํญ์์ ์ถ์ ์ด๋ฒคํธ๋ฅผ ์ค์๊ฐ์ผ๋ก ํ์ธํ์ธ์!
|
319 |
-
</div>
|
320 |
-
|
321 |
-
<div id="detailsSection" style="display: none;">
|
322 |
-
<section class="hero-section" style="margin-top: 40px;">
|
323 |
-
<h2>๐ ๋ธ๋ผ์ฐ์ ์์ธ ์ ๋ณด</h2>
|
324 |
-
<pre id="browserDetails" style="text-align: left; background: #f5f5f5; padding: 20px; border-radius: 8px; overflow-x: auto;"></pre>
|
325 |
-
</section>
|
326 |
-
</div>
|
327 |
-
</div>
|
328 |
-
|
329 |
-
<footer class="footer">
|
330 |
-
<p>© 2025 EV Cook. ๋ชจ๋ ๊ถ๋ฆฌ ๋ณด์ .</p>
|
331 |
-
<p>์ถ์ ์๋ฒ: <a href="https://seawolf2357-evcook.hf.space" target="_blank" style="color: white;">seawolf2357-evcook.hf.space</a></p>
|
332 |
-
</footer>
|
333 |
-
|
334 |
-
<!-- Visitor Tracking Script -->
|
335 |
-
<script>
|
336 |
-
(function() {
|
337 |
-
// ์ถ์ ์๋ฒ URL (์ฌ๋ฐ๋ฅธ URL๋ก ์์ !)
|
338 |
-
const TRACKING_SERVER = 'https://seawolf2357-evcook.hf.space';
|
339 |
-
const SITE_ID = '38e0a883';
|
340 |
-
|
341 |
-
// ๋๋ฐ์ด์ค ID ์์ฑ/์กฐํ
|
342 |
-
function getDeviceId() {
|
343 |
-
let deviceId = localStorage.getItem('_tracker_device_id');
|
344 |
-
if (!deviceId) {
|
345 |
-
// ํ๋์จ์ด ๊ธฐ๋ฐ ID ์์ฑ
|
346 |
-
const components = [
|
347 |
-
screen.width + 'x' + screen.height,
|
348 |
-
navigator.hardwareConcurrency || 0,
|
349 |
-
navigator.deviceMemory || 0,
|
350 |
-
navigator.platform,
|
351 |
-
navigator.language,
|
352 |
-
new Date().getTimezoneOffset()
|
353 |
-
];
|
354 |
-
|
355 |
-
// ๊ฐ๋จํ ํด์ ํจ์
|
356 |
-
let hash = 0;
|
357 |
-
const str = components.join('|');
|
358 |
-
for (let i = 0; i < str.length; i++) {
|
359 |
-
const char = str.charCodeAt(i);
|
360 |
-
hash = ((hash << 5) - hash) + char;
|
361 |
-
hash = hash & hash;
|
362 |
-
}
|
363 |
-
|
364 |
-
deviceId = 'DEV_' + Math.abs(hash).toString(36);
|
365 |
-
localStorage.setItem('_tracker_device_id', deviceId);
|
366 |
-
}
|
367 |
-
return deviceId;
|
368 |
-
}
|
369 |
-
|
370 |
-
// WebGL ์ ๋ณด ์์ง
|
371 |
-
function getWebGLInfo() {
|
372 |
-
try {
|
373 |
-
const canvas = document.createElement('canvas');
|
374 |
-
const gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
|
375 |
-
if (!gl) return 'Not supported';
|
376 |
-
|
377 |
-
const debugInfo = gl.getExtension('WEBGL_debug_renderer_info');
|
378 |
-
if (debugInfo) {
|
379 |
-
return gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL);
|
380 |
-
}
|
381 |
-
return 'Unknown';
|
382 |
-
} catch(e) {
|
383 |
-
return 'Error';
|
384 |
}
|
|
|
|
|
385 |
}
|
386 |
|
387 |
-
//
|
388 |
-
|
389 |
-
const
|
390 |
-
|
391 |
-
deviceId: getDeviceId(),
|
392 |
-
eventType: eventType,
|
393 |
-
eventData: eventData,
|
394 |
-
pageUrl: window.location.href,
|
395 |
-
pageTitle: document.title,
|
396 |
-
referrer: document.referrer,
|
397 |
-
userAgent: navigator.userAgent,
|
398 |
-
screenResolution: screen.width + 'x' + screen.height,
|
399 |
-
platform: navigator.platform,
|
400 |
-
language: navigator.language,
|
401 |
-
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
402 |
-
cpuCores: navigator.hardwareConcurrency || 0,
|
403 |
-
deviceMemory: navigator.deviceMemory || 0,
|
404 |
-
gpuInfo: getWebGLInfo(),
|
405 |
-
timestamp: new Date().toISOString()
|
406 |
-
};
|
407 |
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
headers: {
|
413 |
-
'Content-Type': 'application/json',
|
414 |
-
},
|
415 |
-
body: JSON.stringify({
|
416 |
-
data_json: JSON.stringify(data)
|
417 |
-
})
|
418 |
-
});
|
419 |
-
|
420 |
-
if (response1.ok) {
|
421 |
-
console.log('[Tracker] โ
Event tracked via API:', eventType, data);
|
422 |
-
return;
|
423 |
-
}
|
424 |
-
} catch(e) {
|
425 |
-
console.log('[Tracker] API method failed, trying legacy method...');
|
426 |
-
}
|
427 |
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
method: 'POST',
|
432 |
-
headers: {
|
433 |
-
'Content-Type': 'application/json',
|
434 |
-
},
|
435 |
-
body: JSON.stringify({
|
436 |
-
data: [JSON.stringify(data)],
|
437 |
-
fn_index: 0 // process_tracking API ํจ์์ ์ธ๋ฑ์ค
|
438 |
-
})
|
439 |
-
});
|
440 |
-
|
441 |
-
if (response2.ok) {
|
442 |
-
console.log('[Tracker] โ
Event tracked via legacy:', eventType, data);
|
443 |
-
} else {
|
444 |
-
console.error('[Tracker] โ Server error:', response2.status);
|
445 |
-
}
|
446 |
-
} catch(e) {
|
447 |
-
console.error('[Tracker] โ Network error:', e);
|
448 |
}
|
|
|
|
|
449 |
}
|
450 |
|
451 |
-
//
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
// ํ์ด์ง ๋ก๋์ ์ถ์
|
459 |
-
if (document.readyState === 'loading') {
|
460 |
-
document.addEventListener('DOMContentLoaded', () => collectAndSend());
|
461 |
-
} else {
|
462 |
-
collectAndSend();
|
463 |
-
}
|
464 |
-
|
465 |
-
// SPA ์ง์ - URL ๋ณ๊ฒฝ ๊ฐ์ง
|
466 |
-
let lastUrl = location.href;
|
467 |
-
new MutationObserver(() => {
|
468 |
-
const url = location.href;
|
469 |
-
if (url !== lastUrl) {
|
470 |
-
lastUrl = url;
|
471 |
-
collectAndSend('navigation', { from: lastUrl, to: url });
|
472 |
-
}
|
473 |
-
}).observe(document, {subtree: true, childList: true});
|
474 |
-
|
475 |
-
// ์คํฌ๋กค ์ถ์
|
476 |
-
let scrollTracked = false;
|
477 |
-
window.addEventListener('scroll', () => {
|
478 |
-
if (!scrollTracked && window.scrollY > 100) {
|
479 |
-
scrollTracked = true;
|
480 |
-
window._tracker.trackEvent('scroll', { depth: window.scrollY });
|
481 |
-
}
|
482 |
-
});
|
483 |
-
|
484 |
-
// ๋๋ฒ๊น
์ ๋ณด ์ถ๋ ฅ
|
485 |
-
console.log('%c๐ EV Cook ์ถ์ ์์คํ
์ด๊ธฐํ', 'color: #4CAF50; font-size: 16px; font-weight: bold;');
|
486 |
-
console.log('์ถ์ ์๋ฒ:', TRACKING_SERVER);
|
487 |
-
console.log('์ฌ์ดํธ ID:', SITE_ID);
|
488 |
-
console.log('๋๋ฐ์ด์ค ID:', getDeviceId());
|
489 |
-
})();
|
490 |
-
</script>
|
491 |
-
<!-- End Visitor Tracking Script -->
|
492 |
-
|
493 |
-
<!-- ํ์ด์ง ๊ธฐ๋ฅ ์คํฌ๋ฆฝํธ -->
|
494 |
-
<script>
|
495 |
-
// ํ์ด์ง ๋ก๋์ ์คํ
|
496 |
-
window.addEventListener('DOMContentLoaded', () => {
|
497 |
-
// Device ID ํ์
|
498 |
-
setTimeout(() => {
|
499 |
-
const deviceId = localStorage.getItem('_tracker_device_id');
|
500 |
-
if (deviceId) {
|
501 |
-
document.getElementById('deviceId').textContent = deviceId;
|
502 |
-
}
|
503 |
-
document.getElementById('trackingStart').textContent = new Date().toLocaleString('ko-KR');
|
504 |
-
}, 500);
|
505 |
-
});
|
506 |
-
|
507 |
-
// ์ถ์ ํ
์คํธ
|
508 |
-
function testTracking() {
|
509 |
-
if (window._tracker) {
|
510 |
-
window._tracker.trackEvent('test_button_click', {
|
511 |
-
button: 'tracking_test',
|
512 |
-
timestamp: Date.now(),
|
513 |
-
location: 'hero_section'
|
514 |
-
});
|
515 |
-
|
516 |
-
alert('โ
์ถ์ ์ด๋ฒคํธ๊ฐ ์ ์ก๋์์ต๋๋ค!\n\n๊ฐ๋ฐ์ ๋๊ตฌ(F12) Console ํญ์์ ํ์ธํ์ธ์.');
|
517 |
-
} else {
|
518 |
-
alert('โ ์ถ์ ์คํฌ๋ฆฝํธ๊ฐ ๋ก๋๋์ง ์์์ต๋๋ค.');
|
519 |
-
}
|
520 |
-
}
|
521 |
-
|
522 |
-
// ์ปค์คํ
์ด๋ฒคํธ ์ ์ก
|
523 |
-
function sendCustomEvent() {
|
524 |
-
const eventName = prompt('์ด๋ฒคํธ ์ด๋ฆ์ ์
๋ ฅํ์ธ์:', 'custom_action');
|
525 |
-
if (eventName && window._tracker) {
|
526 |
-
const eventData = {
|
527 |
-
custom_name: eventName,
|
528 |
-
user_input: true,
|
529 |
-
timestamp: Date.now()
|
530 |
-
};
|
531 |
-
|
532 |
-
window._tracker.trackEvent(eventName, eventData);
|
533 |
-
|
534 |
-
alert(`โ
'${eventName}' ์ด๋ฒคํธ๊ฐ ์ ์ก๋์์ต๋๋ค!`);
|
535 |
-
console.log('[Custom Event]', eventName, eventData);
|
536 |
-
}
|
537 |
-
}
|
538 |
-
|
539 |
-
// ์์ธ ์ ๋ณด ๋ณด๊ธฐ
|
540 |
-
function viewDetails() {
|
541 |
-
const details = {
|
542 |
-
tracking: {
|
543 |
-
deviceId: localStorage.getItem('_tracker_device_id'),
|
544 |
-
siteId: '38e0a883',
|
545 |
-
serverUrl: 'https://seawolf2357-evcook.hf.space'
|
546 |
-
},
|
547 |
-
browser: {
|
548 |
-
userAgent: navigator.userAgent,
|
549 |
-
platform: navigator.platform,
|
550 |
-
vendor: navigator.vendor,
|
551 |
-
language: navigator.language,
|
552 |
-
languages: navigator.languages,
|
553 |
-
cookieEnabled: navigator.cookieEnabled,
|
554 |
-
doNotTrack: navigator.doNotTrack,
|
555 |
-
onLine: navigator.onLine
|
556 |
-
},
|
557 |
-
screen: {
|
558 |
-
resolution: screen.width + 'x' + screen.height,
|
559 |
-
colorDepth: screen.colorDepth,
|
560 |
-
pixelRatio: window.devicePixelRatio
|
561 |
-
},
|
562 |
-
viewport: {
|
563 |
-
width: window.innerWidth,
|
564 |
-
height: window.innerHeight
|
565 |
-
},
|
566 |
-
hardware: {
|
567 |
-
cpuCores: navigator.hardwareConcurrency || 'Unknown',
|
568 |
-
deviceMemory: navigator.deviceMemory ? navigator.deviceMemory + 'GB' : 'Unknown'
|
569 |
},
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
},
|
576 |
-
time: {
|
577 |
-
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
578 |
-
offset: new Date().getTimezoneOffset(),
|
579 |
-
locale: new Date().toLocaleString()
|
580 |
-
}
|
581 |
-
};
|
582 |
-
|
583 |
-
document.getElementById('browserDetails').textContent = JSON.stringify(details, null, 2);
|
584 |
-
document.getElementById('detailsSection').style.display = 'block';
|
585 |
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
console.
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- Simplified API Tracking Script -->
|
2 |
+
<script>
|
3 |
+
(function() {
|
4 |
+
// ์ถ์ ์๋ฒ ์ค์
|
5 |
+
const TRACKING_SERVER = 'https://seawolf2357-evcook.hf.space';
|
6 |
+
const SITE_ID = '38e0a883';
|
7 |
+
|
8 |
+
// ๋๋ฐ์ด์ค ID ์์ฑ
|
9 |
+
function getDeviceId() {
|
10 |
+
let deviceId = localStorage.getItem('_tracker_device_id');
|
11 |
+
if (!deviceId) {
|
12 |
+
deviceId = 'DEV_' + Date.now() + '_' + Math.random().toString(36).substring(2, 9);
|
13 |
+
localStorage.setItem('_tracker_device_id', deviceId);
|
14 |
+
}
|
15 |
+
return deviceId;
|
16 |
+
}
|
17 |
+
|
18 |
+
// ์ถ์ ๋ฐ์ดํฐ ์ ์ก (๋จ์ํ)
|
19 |
+
async function sendTracking(eventType = 'pageview', eventData = {}) {
|
20 |
+
const data = {
|
21 |
+
siteId: SITE_ID,
|
22 |
+
deviceId: getDeviceId(),
|
23 |
+
eventType: eventType,
|
24 |
+
eventData: eventData,
|
25 |
+
pageUrl: window.location.href,
|
26 |
+
pageTitle: document.title,
|
27 |
+
referrer: document.referrer,
|
28 |
+
userAgent: navigator.userAgent,
|
29 |
+
screenResolution: screen.width + 'x' + screen.height,
|
30 |
+
platform: navigator.platform,
|
31 |
+
language: navigator.language,
|
32 |
+
timestamp: new Date().toISOString()
|
33 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
+
console.log('[Tracker] Sending:', eventType);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
+
// ๋ฐฉ๋ฒ 1: Direct API with data_json parameter
|
38 |
+
try {
|
39 |
+
const response = await fetch(TRACKING_SERVER + '/api/predict/', {
|
40 |
+
method: 'POST',
|
41 |
+
headers: {
|
42 |
+
'Content-Type': 'application/json',
|
43 |
+
},
|
44 |
+
body: JSON.stringify({
|
45 |
+
data: [JSON.stringify(data)], // data_json expects a string
|
46 |
+
fn_index: 0
|
47 |
+
})
|
48 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
+
if (response.ok) {
|
51 |
+
console.log('[Tracker] โ
Success (Method 1)');
|
52 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
+
} catch (e) {
|
55 |
+
console.log('[Tracker] Method 1 error:', e);
|
56 |
}
|
57 |
|
58 |
+
// ๋ฐฉ๋ฒ 2: Using form data (alternative approach)
|
59 |
+
try {
|
60 |
+
const formData = new FormData();
|
61 |
+
formData.append('data_json', JSON.stringify(data));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
+
const response = await fetch(TRACKING_SERVER + '/api/process_tracking', {
|
64 |
+
method: 'POST',
|
65 |
+
body: formData
|
66 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
+
if (response.ok) {
|
69 |
+
console.log('[Tracker] โ
Success (Method 2)');
|
70 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
+
} catch (e) {
|
73 |
+
console.log('[Tracker] Method 2 error:', e);
|
74 |
}
|
75 |
|
76 |
+
// ๋ฐฉ๋ฒ 3: Legacy endpoint
|
77 |
+
try {
|
78 |
+
const response = await fetch(TRACKING_SERVER + '/run/predict', {
|
79 |
+
method: 'POST',
|
80 |
+
headers: {
|
81 |
+
'Content-Type': 'application/json',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
},
|
83 |
+
body: JSON.stringify({
|
84 |
+
data: [JSON.stringify(data)],
|
85 |
+
fn_index: 0
|
86 |
+
})
|
87 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
+
if (response.ok) {
|
90 |
+
console.log('[Tracker] โ
Success (Method 3)');
|
91 |
+
return;
|
92 |
+
}
|
93 |
+
} catch (e) {
|
94 |
+
console.log('[Tracker] Method 3 error:', e);
|
95 |
+
}
|
96 |
+
|
97 |
+
console.error('[Tracker] โ All methods failed');
|
98 |
+
}
|
99 |
+
|
100 |
+
// ์ ์ญ ์ถ์ ๊ฐ์ฒด
|
101 |
+
window._tracker = {
|
102 |
+
trackEvent: function(name, data) {
|
103 |
+
sendTracking('custom', { name: name, data: data });
|
104 |
+
},
|
105 |
+
|
106 |
+
// ๊ฐ๋จํ ํ
์คํธ ํจ์
|
107 |
+
test: function() {
|
108 |
+
console.log('[Tracker] Sending test event...');
|
109 |
+
sendTracking('test', {
|
110 |
+
message: 'This is a test event',
|
111 |
+
timestamp: new Date().toISOString()
|
112 |
+
});
|
113 |
+
}
|
114 |
+
};
|
115 |
+
|
116 |
+
// ํ์ด์ง ๋ก๋ ์ถ์
|
117 |
+
sendTracking('pageview');
|
118 |
+
|
119 |
+
// ์คํฌ๋กค ์ถ์
|
120 |
+
let scrolled = false;
|
121 |
+
window.addEventListener('scroll', function() {
|
122 |
+
if (!scrolled && window.scrollY > 100) {
|
123 |
+
scrolled = true;
|
124 |
+
sendTracking('scroll', { depth: window.scrollY });
|
125 |
+
}
|
126 |
+
});
|
127 |
+
|
128 |
+
console.log('๐ EV Cook Tracker Ready');
|
129 |
+
console.log('Device ID:', getDeviceId());
|
130 |
+
console.log('Test with: window._tracker.test()');
|
131 |
+
})();
|
132 |
+
</script>
|