Spaces:
Running
Running
<html lang="ko"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>EV Cook Site - ๋ฐฉ๋ฌธ์ ์ถ์ ํ์ฑํ</title> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
} | |
body { | |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; | |
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); | |
min-height: 100vh; | |
color: #333; | |
} | |
.header { | |
background: rgba(255, 255, 255, 0.95); | |
padding: 20px 0; | |
box-shadow: 0 2px 10px rgba(0,0,0,0.1); | |
} | |
.header-content { | |
max-width: 1200px; | |
margin: 0 auto; | |
padding: 0 20px; | |
display: flex; | |
justify-content: space-between; | |
align-items: center; | |
} | |
.logo { | |
font-size: 28px; | |
font-weight: bold; | |
color: #1e3c72; | |
} | |
.nav { | |
display: flex; | |
gap: 30px; | |
} | |
.nav a { | |
color: #333; | |
text-decoration: none; | |
font-weight: 500; | |
transition: color 0.3s; | |
} | |
.nav a:hover { | |
color: #1e3c72; | |
} | |
.main-container { | |
max-width: 1200px; | |
margin: 50px auto; | |
padding: 0 20px; | |
} | |
.hero-section { | |
background: white; | |
border-radius: 20px; | |
padding: 60px; | |
text-align: center; | |
box-shadow: 0 20px 60px rgba(0,0,0,0.1); | |
margin-bottom: 40px; | |
} | |
.hero-section h1 { | |
font-size: 48px; | |
color: #1e3c72; | |
margin-bottom: 20px; | |
} | |
.hero-section p { | |
font-size: 20px; | |
color: #666; | |
margin-bottom: 30px; | |
} | |
.tracking-status { | |
background: #e8f5e9; | |
border: 2px solid #4caf50; | |
border-radius: 10px; | |
padding: 20px; | |
margin: 20px 0; | |
} | |
.tracking-status h3 { | |
color: #2e7d32; | |
margin-bottom: 10px; | |
} | |
.info-grid { | |
display: grid; | |
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |
gap: 20px; | |
margin-top: 40px; | |
} | |
.info-card { | |
background: white; | |
padding: 30px; | |
border-radius: 15px; | |
box-shadow: 0 10px 30px rgba(0,0,0,0.1); | |
transition: transform 0.3s; | |
} | |
.info-card:hover { | |
transform: translateY(-5px); | |
} | |
.info-card h3 { | |
color: #1e3c72; | |
margin-bottom: 15px; | |
font-size: 24px; | |
} | |
.info-card p { | |
color: #666; | |
line-height: 1.6; | |
} | |
.status-indicator { | |
display: inline-flex; | |
align-items: center; | |
gap: 8px; | |
background: #f5f5f5; | |
padding: 8px 16px; | |
border-radius: 20px; | |
font-size: 14px; | |
} | |
.status-indicator.active { | |
background: #e8f5e9; | |
color: #2e7d32; | |
} | |
.status-dot { | |
width: 8px; | |
height: 8px; | |
border-radius: 50%; | |
background: #4caf50; | |
animation: pulse 2s infinite; | |
} | |
@keyframes pulse { | |
0% { | |
box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); | |
} | |
70% { | |
box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); | |
} | |
100% { | |
box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); | |
} | |
} | |
.tracking-details { | |
background: #f8f9fa; | |
padding: 20px; | |
border-radius: 10px; | |
margin-top: 20px; | |
font-family: monospace; | |
font-size: 14px; | |
} | |
.tracking-details .row { | |
display: flex; | |
justify-content: space-between; | |
padding: 8px 0; | |
border-bottom: 1px solid #e0e0e0; | |
} | |
.tracking-details .row:last-child { | |
border-bottom: none; | |
} | |
.tracking-details .label { | |
font-weight: bold; | |
color: #555; | |
} | |
.tracking-details .value { | |
color: #1e3c72; | |
} | |
.buttons { | |
display: flex; | |
gap: 15px; | |
margin-top: 30px; | |
justify-content: center; | |
flex-wrap: wrap; | |
} | |
button { | |
padding: 12px 30px; | |
background: #1e3c72; | |
color: white; | |
border: none; | |
border-radius: 8px; | |
font-size: 16px; | |
font-weight: 500; | |
cursor: pointer; | |
transition: all 0.3s; | |
} | |
button:hover { | |
background: #2a5298; | |
transform: translateY(-2px); | |
box-shadow: 0 5px 15px rgba(0,0,0,0.2); | |
} | |
button.secondary { | |
background: #757575; | |
} | |
button.secondary:hover { | |
background: #616161; | |
} | |
.footer { | |
text-align: center; | |
padding: 40px 20px; | |
color: white; | |
margin-top: 60px; | |
} | |
.console-hint { | |
background: #fff3cd; | |
border: 1px solid #ffeaa7; | |
padding: 15px; | |
border-radius: 8px; | |
margin: 20px 0; | |
text-align: center; | |
} | |
.console-hint code { | |
background: #f8f9fa; | |
padding: 2px 6px; | |
border-radius: 3px; | |
font-family: monospace; | |
} | |
.debug-panel { | |
background: #f0f0f0; | |
border: 2px solid #999; | |
border-radius: 10px; | |
padding: 20px; | |
margin: 20px 0; | |
display: none; | |
} | |
.debug-panel h3 { | |
color: #333; | |
margin-bottom: 10px; | |
} | |
.debug-log { | |
background: white; | |
border: 1px solid #ccc; | |
border-radius: 5px; | |
padding: 10px; | |
height: 200px; | |
overflow-y: auto; | |
font-family: monospace; | |
font-size: 12px; | |
} | |
.debug-log .log-entry { | |
margin: 2px 0; | |
padding: 2px 5px; | |
} | |
.debug-log .success { | |
color: #2e7d32; | |
background: #e8f5e9; | |
} | |
.debug-log .error { | |
color: #c62828; | |
background: #ffebee; | |
} | |
.debug-log .info { | |
color: #1565c0; | |
background: #e3f2fd; | |
} | |
</style> | |
</head> | |
<body> | |
<header class="header"> | |
<div class="header-content"> | |
<div class="logo">โก EV Cook</div> | |
<nav class="nav"> | |
<a href="#home">ํ</a> | |
<a href="#about">์๊ฐ</a> | |
<a href="#tracking">์ถ์ ์ ๋ณด</a> | |
<a href="#contact">๋ฌธ์</a> | |
</nav> | |
</div> | |
</header> | |
<div class="main-container"> | |
<section class="hero-section"> | |
<h1>EV Cook ์ถ์ ๋ฐ๋ชจ ์ฌ์ดํธ</h1> | |
<p>์ด ์ฌ์ดํธ๋ ๋ฐฉ๋ฌธ์ ์ถ์ ์์คํ ์ด ํ์ฑํ๋์ด ์์ต๋๋ค</p> | |
<div class="tracking-status"> | |
<h3>๐ ์ถ์ ์ํ</h3> | |
<div class="status-indicator active"> | |
<span class="status-dot"></span> | |
<span>์ถ์ ํ์ฑํ๋จ</span> | |
</div> | |
<div class="tracking-details"> | |
<div class="row"> | |
<span class="label">Device ID:</span> | |
<span class="value" id="deviceId">๋ก๋ฉ ์ค...</span> | |
</div> | |
<div class="row"> | |
<span class="label">์ถ์ ์๋ฒ:</span> | |
<span class="value">seawolf2357-ev-cook-siteurl.static.hf.space</span> | |
</div> | |
<div class="row"> | |
<span class="label">์ฌ์ดํธ ID:</span> | |
<span class="value">c4562ca1</span> | |
</div> | |
<div class="row"> | |
<span class="label">์ถ์ ์์:</span> | |
<span class="value" id="trackingStart">-</span> | |
</div> | |
<div class="row"> | |
<span class="label">์ ์ก ์ํ:</span> | |
<span class="value" id="trackingStatus">๋๊ธฐ ์ค...</span> | |
</div> | |
</div> | |
</div> | |
<div class="buttons"> | |
<button onclick="testTracking()">๐ ์ถ์ ํ ์คํธ</button> | |
<button onclick="sendCustomEvent()">๐ฏ ์ปค์คํ ์ด๋ฒคํธ</button> | |
<button onclick="viewDetails()" class="secondary">๐ ์์ธ ์ ๋ณด</button> | |
<button onclick="toggleDebug()" class="secondary">๐ ๋๋ฒ๊ทธ ํจ๋</button> | |
</div> | |
</section> | |
<div class="debug-panel" id="debugPanel"> | |
<h3>๐ ๋๋ฒ๊ทธ ๋ก๊ทธ</h3> | |
<div class="debug-log" id="debugLog"></div> | |
<div class="buttons" style="margin-top: 10px;"> | |
<button onclick="clearDebugLog()" class="secondary">๋ก๊ทธ ์ง์ฐ๊ธฐ</button> | |
<button onclick="checkServerStatus()" class="secondary">์๋ฒ ์ํ ํ์ธ</button> | |
</div> | |
</div> | |
<div class="info-grid"> | |
<div class="info-card"> | |
<h3>๐ ์ค์๊ฐ ์ถ์ </h3> | |
<p>ํ์ด์ง ๋ฐฉ๋ฌธ, ํด๋ฆญ, ์คํฌ๋กค ๋ฑ ๋ชจ๋ ์ฌ์ฉ์ ํ๋์ด ์ค์๊ฐ์ผ๋ก ์ถ์ ๋ฉ๋๋ค. ๊ฐ๋ฐ์ ๋๊ตฌ ์ฝ์์์ ์ถ์ ๋ก๊ทธ๋ฅผ ํ์ธํ ์ ์์ต๋๋ค.</p> | |
</div> | |
<div class="info-card"> | |
<h3>๐ ๊ฐ์ธ์ ๋ณด ๋ณดํธ</h3> | |
<p>๋๋ฐ์ด์ค ID๋ ๋ธ๋ผ์ฐ์ ์ ๋ณด๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์์ฑ๋๋ฉฐ, ๊ฐ์ธ์ ์๋ณํ ์ ์๋ ์ ๋ณด๋ ์์งํ์ง ์์ต๋๋ค.</p> | |
</div> | |
<div class="info-card"> | |
<h3>๐ ๋ถ์ ๋์๋ณด๋</h3> | |
<p>์์ง๋ ๋ฐ์ดํฐ๋ ์ถ์ ์๋ฒ์ ๋์๋ณด๋์์ ์ค์๊ฐ์ผ๋ก ํ์ธํ ์ ์์ต๋๋ค.</p> | |
</div> | |
</div> | |
<div class="console-hint"> | |
๐ก <strong>๊ฐ๋ฐ์ ๋๊ตฌ ํ์ฉ:</strong> <code>F12</code>๋ฅผ ๋๋ฌ Console ํญ์์ ์ถ์ ์ด๋ฒคํธ๋ฅผ ์ค์๊ฐ์ผ๋ก ํ์ธํ์ธ์! | |
</div> | |
<div id="detailsSection" style="display: none;"> | |
<section class="hero-section" style="margin-top: 40px;"> | |
<h2>๐ ๋ธ๋ผ์ฐ์ ์์ธ ์ ๋ณด</h2> | |
<pre id="browserDetails" style="text-align: left; background: #f5f5f5; padding: 20px; border-radius: 8px; overflow-x: auto;"></pre> | |
</section> | |
</div> | |
</div> | |
<footer class="footer"> | |
<p>© 2025 EV Cook. ๋ชจ๋ ๊ถ๋ฆฌ ๋ณด์ .</p> | |
<p>์ถ์ ์๋ฒ: <a href="https://seawolf2357-ev-cook-siteurl.static.hf.space" target="_blank" style="color: white;">seawolf2357-ev-cook-siteurl.static.hf.space</a></p> | |
</footer> | |
<!-- Visitor Tracking Script --> | |
<script> | |
(function() { | |
// ์ถ์ ์๋ฒ URL | |
const TRACKING_SERVER = 'https://seawolf2357-ev-cook-siteurl.static.hf.space/'; | |
const SITE_ID = 'c4562ca1'; | |
// ๋๋ฐ์ด์ค ID ์์ฑ/์กฐํ | |
function getDeviceId() { | |
let deviceId = localStorage.getItem('_tracker_device_id'); | |
if (!deviceId) { | |
deviceId = 'DEV_' + Date.now() + '_' + Math.random().toString(36).substring(2, 9); | |
localStorage.setItem('_tracker_device_id', deviceId); | |
} | |
return deviceId; | |
} | |
// ์ถ์ ๋ฐ์ดํฐ ์ ์ก | |
async function collectAndSend(eventType = 'pageview', eventData = {}) { | |
const data = { | |
siteId: SITE_ID, | |
deviceId: getDeviceId(), | |
eventType: eventType, | |
eventData: eventData, | |
pageUrl: window.location.href, | |
pageTitle: document.title, | |
referrer: document.referrer, | |
userAgent: navigator.userAgent, | |
screenResolution: screen.width + 'x' + screen.height, | |
platform: navigator.platform, | |
language: navigator.language, | |
timestamp: new Date().toISOString() | |
}; | |
try { | |
const response = await fetch(TRACKING_SERVER + '/call/process_tracking', { | |
method: 'POST', | |
headers: { 'Content-Type': 'application/json' }, | |
body: JSON.stringify({ data: [JSON.stringify(data)] }) | |
}); | |
if (response.ok) { | |
const result = await response.json(); | |
if (result.event_id) { | |
console.log('[Tracker] โ Event tracked'); | |
updateTrackingStatus('์ ์ก ์๋ฃ'); | |
addDebugLog('success', `์ด๋ฒคํธ ์ ์ก ์ฑ๊ณต: ${eventType}`); | |
} | |
} else { | |
console.error('[Tracker] Server error:', response.status); | |
updateTrackingStatus('์ ์ก ์คํจ'); | |
addDebugLog('error', `์๋ฒ ์ค๋ฅ: ${response.status}`); | |
} | |
} catch(e) { | |
console.error('[Tracker] Error:', e); | |
updateTrackingStatus('๋คํธ์ํฌ ์ค๋ฅ'); | |
addDebugLog('error', `๋คํธ์ํฌ ์ค๋ฅ: ${e.message}`); | |
} | |
} | |
// ์ ์ญ ์ถ์ ํจ์ | |
window._tracker = { | |
trackEvent: function(eventName, eventData) { | |
collectAndSend('custom', { name: eventName, data: eventData }); | |
} | |
}; | |
// ํ์ด์ง ๋ก๋์ ์ถ์ | |
if (document.readyState === 'loading') { | |
document.addEventListener('DOMContentLoaded', () => collectAndSend()); | |
} else { | |
collectAndSend(); | |
} | |
// ๋๋ฒ๊ทธ ๋ก๊ทธ (UI ์ฐ๋์ฉ) | |
const debugLog = []; | |
function addDebugLog(type, message) { | |
const timestamp = new Date().toLocaleTimeString(); | |
debugLog.push({ type, message, timestamp }); | |
updateDebugPanel(); | |
} | |
function updateDebugPanel() { | |
const debugLogEl = document.getElementById('debugLog'); | |
if (debugLogEl) { | |
debugLogEl.innerHTML = debugLog.slice(-50).reverse().map(entry => | |
`<div class="log-entry ${entry.type}">[${entry.timestamp}] ${entry.message}</div>` | |
).join(''); | |
} | |
} | |
function updateTrackingStatus(status) { | |
const statusEl = document.getElementById('trackingStatus'); | |
if (statusEl) { | |
statusEl.textContent = status; | |
} | |
} | |
// ์ ์ญ ํจ์ ํ์ฅ | |
window._tracker.getDebugLog = function() { | |
return debugLog; | |
}; | |
// ์ด๊ธฐํ ๋ก๊ทธ | |
console.log('๐ EV Cook Tracker ์ด๊ธฐํ๋จ'); | |
console.log('์๋ฒ:', TRACKING_SERVER); | |
console.log('์ฌ์ดํธ ID:', SITE_ID); | |
console.log('๋๋ฐ์ด์ค ID:', getDeviceId()); | |
addDebugLog('info', 'EV Cook Tracker ์ด๊ธฐํ ์๋ฃ'); | |
})(); | |
</script> | |
<!-- End Visitor Tracking Script --> | |
<!-- ํ์ด์ง ๊ธฐ๋ฅ ์คํฌ๋ฆฝํธ --> | |
<script> | |
// ํ์ด์ง ๋ก๋์ ์คํ | |
window.addEventListener('DOMContentLoaded', () => { | |
// Device ID ํ์ | |
setTimeout(() => { | |
const deviceId = localStorage.getItem('_tracker_device_id'); | |
if (deviceId) { | |
document.getElementById('deviceId').textContent = deviceId; | |
} | |
document.getElementById('trackingStart').textContent = new Date().toLocaleString('ko-KR'); | |
}, 500); | |
}); | |
// ์ถ์ ํ ์คํธ | |
function testTracking() { | |
if (window._tracker) { | |
window._tracker.trackEvent('test_button_click', { | |
button: 'tracking_test', | |
timestamp: Date.now(), | |
location: 'hero_section', | |
userAction: true | |
}); | |
alert('โ ์ถ์ ์ด๋ฒคํธ๊ฐ ์ ์ก๋์์ต๋๋ค!\n\n์ฝ์๊ณผ ๋๋ฒ๊ทธ ํจ๋์์ ํ์ธํ์ธ์.'); | |
} else { | |
alert('โ ์ถ์ ์คํฌ๋ฆฝํธ๊ฐ ๋ก๋๋์ง ์์์ต๋๋ค.'); | |
} | |
} | |
// ์ปค์คํ ์ด๋ฒคํธ ์ ์ก | |
function sendCustomEvent() { | |
const eventName = prompt('์ด๋ฒคํธ ์ด๋ฆ์ ์ ๋ ฅํ์ธ์:', 'custom_action'); | |
if (eventName && window._tracker) { | |
const eventData = { | |
custom_name: eventName, | |
user_input: true, | |
timestamp: Date.now(), | |
metadata: { | |
viewport: { | |
width: window.innerWidth, | |
height: window.innerHeight | |
}, | |
scroll: { | |
x: window.scrollX, | |
y: window.scrollY | |
} | |
} | |
}; | |
window._tracker.trackEvent(eventName, eventData); | |
alert(`โ '${eventName}' ์ด๋ฒคํธ๊ฐ ์ ์ก๋์์ต๋๋ค!`); | |
console.log('[Custom Event]', eventName, eventData); | |
} | |
} | |
// ์์ธ ์ ๋ณด ๋ณด๊ธฐ | |
function viewDetails() { | |
const details = { | |
tracking: { | |
deviceId: localStorage.getItem('_tracker_device_id'), | |
siteId: 'c4562ca1', | |
serverUrl: 'https://seawolf2357-ev-cook-siteurl.static.hf.space', | |
startTime: new Date().toLocaleString() | |
}, | |
browser: { | |
userAgent: navigator.userAgent, | |
platform: navigator.platform, | |
vendor: navigator.vendor, | |
language: navigator.language, | |
languages: navigator.languages, | |
cookieEnabled: navigator.cookieEnabled, | |
doNotTrack: navigator.doNotTrack, | |
onLine: navigator.onLine, | |
plugins: navigator.plugins.length | |
}, | |
screen: { | |
resolution: screen.width + 'x' + screen.height, | |
availableResolution: screen.availWidth + 'x' + screen.availHeight, | |
colorDepth: screen.colorDepth, | |
pixelRatio: window.devicePixelRatio, | |
orientation: screen.orientation ? screen.orientation.type : 'Unknown' | |
}, | |
viewport: { | |
width: window.innerWidth, | |
height: window.innerHeight, | |
scrollX: window.scrollX, | |
scrollY: window.scrollY | |
}, | |
hardware: { | |
cpuCores: navigator.hardwareConcurrency || 'Unknown', | |
deviceMemory: navigator.deviceMemory ? navigator.deviceMemory + 'GB' : 'Unknown', | |
maxTouchPoints: navigator.maxTouchPoints || 0 | |
}, | |
location: { | |
href: window.location.href, | |
hostname: window.location.hostname, | |
protocol: window.location.protocol, | |
pathname: window.location.pathname, | |
search: window.location.search, | |
hash: window.location.hash | |
}, | |
time: { | |
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone, | |
offset: new Date().getTimezoneOffset(), | |
locale: new Date().toLocaleString() | |
}, | |
storage: { | |
localStorage: typeof(Storage) !== "undefined", | |
sessionStorage: typeof(sessionStorage) !== "undefined", | |
indexedDB: 'indexedDB' in window, | |
cookies: navigator.cookieEnabled | |
} | |
}; | |
document.getElementById('browserDetails').textContent = JSON.stringify(details, null, 2); | |
document.getElementById('detailsSection').style.display = 'block'; | |
// ์์ธ ์ ๋ณด ๋ณด๊ธฐ๋ ์ถ์ | |
window._tracker.trackEvent('view_details', { | |
action: 'show_browser_info', | |
detailsViewed: Object.keys(details) | |
}); | |
} | |
// ๋๋ฒ๊ทธ ํจ๋ ํ ๊ธ | |
function toggleDebug() { | |
const panel = document.getElementById('debugPanel'); | |
if (panel) { | |
panel.style.display = panel.style.display === 'none' ? 'block' : 'none'; | |
if (panel.style.display === 'block') { | |
window._tracker.trackEvent('debug_panel_opened', { timestamp: Date.now() }); | |
} | |
} | |
} | |
// ๋๋ฒ๊ทธ ๋ก๊ทธ ์ง์ฐ๊ธฐ | |
function clearDebugLog() { | |
if (window._tracker && window._tracker.getDebugLog) { | |
window._tracker.getDebugLog().length = 0; | |
const debugLogEl = document.getElementById('debugLog'); | |
if (debugLogEl) { | |
debugLogEl.innerHTML = '<div class="log-entry info">๋ก๊ทธ๊ฐ ์ง์์ก์ต๋๋ค.</div>'; | |
} | |
} | |
} | |
// ์๋ฒ ์ํ ํ์ธ | |
async function checkServerStatus() { | |
try { | |
const response = await fetch('https://seawolf2357-ev-cook-siteurl.static.hf.space/'); | |
if (response.ok) { | |
alert('โ ์๋ฒ๊ฐ ์ ์์ ์ผ๋ก ์๋ ์ค์ ๋๋ค.'); | |
} else { | |
alert('โ ๏ธ ์๋ฒ ์๋ต ์ํ: ' + response.status); | |
} | |
} catch (e) { | |
alert('โ ์๋ฒ์ ์ฐ๊ฒฐํ ์ ์์ต๋๋ค: ' + e.message); | |
} | |
} | |
// ์ฝ์์ ์ถ์ ์ ๋ณด ์ถ๋ ฅ | |
console.log('%c๐ EV Cook ์ถ์ ์์คํ ํ์ฑํ๋จ', 'color: #4CAF50; font-size: 16px; font-weight: bold;'); | |
console.log('%c์ถ์ ์๋ฒ:', 'font-weight: bold;', 'https://seawolf2357-ev-cook-siteurl.static.hf.space'); | |
console.log('%c์ฌ์ดํธ ID:', 'font-weight: bold;', 'c4562ca1'); | |
console.log('%cDevice ID:', 'font-weight: bold;', localStorage.getItem('_tracker_device_id') || '์์ฑ ์ค...'); | |
console.log('\n%c๐ก Tip: ๋๋ฒ๊ทธ ํจ๋ ๋ฒํผ์ ํด๋ฆญํ์ฌ ์ค์๊ฐ ์ถ์ ๋ก๊ทธ๋ฅผ ํ์ธํ์ธ์!', 'color: #666;'); | |
</script> | |
</body> | |
</html> |