Minor changes
All checks were successful
Deploy Website / build-and-deploy (push) Successful in 27s

This commit is contained in:
Akshay Kolli
2026-02-08 14:05:15 -05:00
parent b0ad1287fb
commit 9b8a25f5c8
7 changed files with 41 additions and 123 deletions

View File

@@ -10,12 +10,8 @@ export function Analytics() {
// Send beacon on mount and path change
const sendBeacon = async () => {
try {
// Point to the Admin Dashboard API
// In prod, this URL needs to be the absolute URL of admin_dash
// For local docker, standard localhost access might work if CORS allows,
// or we route through a proxy.
// For this personal setup, let's assume they are on same domain or localhost.
await fetch('http://localhost:3000/api/track', { // TODO: Make this configurable
// Send beacon to THIS website's API, which will relay it to the admin dash
await fetch('/api/analytics', {
method: 'POST',
body: JSON.stringify({ path: pathname, timestamp: Date.now() }),
headers: { 'Content-Type': 'application/json' },