Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/samgutentag/sbburgerweek/llms.txt

Use this file to discover all available pages before exploring further.

After your event ends, follow these steps to preserve your data and stop live tracking. The map itself stays live with all restaurant data intact — only the active tracking and analytics collection stop. Visitors can still browse the map, open popups, and get directions long after the event concludes.
You must snapshot hourly data before setting trackUrl to null. Once tracking is disabled and the Worker stops accepting writes, the hourly breakdown data is no longer queryable. Do step 2 before step 3.

Wind-down sequence

1

Run a final tracking snapshot

Trigger one last daily snapshot to capture any events that occurred since the most recent scheduled run. You can do this from the GitHub Actions tab or from the command line:Via GitHub Actions tab: Go to your repo → Actions tab → Snapshot Tracking DataRun workflowVia GitHub CLI:
gh workflow run "Snapshot Tracking Data"
Wait for the workflow to complete before moving on. The snapshot is committed to snapshots/tracking-YYYY-MM-DD.json.
2

Snapshot hourly data for stats charts

The /stats page displays hourly chart data. Once you disable the Worker, this data is no longer fetchable live — so you need to archive it now. Run the snapshot script while trackUrl is still set:
./snapshot-hourly.sh
git add snapshots/hourly-events.json snapshots/hourly-labels.json
snapshot-hourly.sh reads eventStartDate and eventEndDate from config.js, queries the Worker for hourly action counts and per-filter-label breakdowns, and writes the results to snapshots/hourly-events.json and snapshots/hourly-labels.json. The stats page loads these files automatically when the event is concluded — no Worker calls needed.
3

Disable tracking in config.js

Open config.js and set both tracking fields to null:
trackUrl: null,
cfAnalyticsToken: null,
Setting trackUrl: null causes all window.track() calls in the client to become no-ops. Setting cfAnalyticsToken: null removes the Cloudflare Web Analytics snippet from the page entirely.
4

Run apply-theme.py

Regenerate all HTML files and assets to bake in the null values:
python3 apply-theme.py
This updates index.html, stats/index.html, and embed/map/index.html so they no longer reference the tracking Worker URL or analytics snippet.
5

Comment out cron schedules in workflow files

Open .github/workflows/fetch-hours.yml and .github/workflows/snapshot-tracking.yml. Comment out the schedule: block in each so the workflows no longer run automatically:
# schedule:
#   # Hourly during event week — adjust date range for next event
#   - cron: "0 * 5-14 3 *"
Both workflows keep their workflow_dispatch: trigger so you can still run them manually if needed.
6

Put the Worker in read-only mode

In workers/track/index.js, add an early return in the POST handler to short-circuit all writes, and comment out the writeDataPoint call. This makes the Worker reject new tracking events while keeping the GET endpoints live (so /stats can still query historical data if needed).
7

Deploy the updated Worker

Push the read-only Worker to Cloudflare:
cd workers/track && wrangler deploy
8

Commit and push everything

Stage and push all changes — the updated config.js, regenerated HTML files, commented-out workflow schedules, and the Worker source:
git add .
git commit -m "Wind down after event"
git push

What happens after wind-down

Once the wind-down is complete:
  • The map stays live. All restaurant data, popups, filters, and directions links remain fully functional for visitors browsing after the event.
  • The concluded banner shows automatically. index.html and stats/index.html display a concluded banner once the current date is past eventEndDate in config.js. No manual change is needed.
  • The /stats page loads from snapshot files. Rather than querying the Worker live, stats.js reads from the committed snapshots/hourly-events.json and snapshots/hourly-labels.json files when the event is concluded. The leaderboard and charts render the same data as during the event — it’s just frozen at the final snapshot.
  • No ongoing costs. With trackUrl: null and cron schedules commented out, no Cloudflare API calls or Google Places API calls are made after wind-down.
Cloudflare Analytics Engine retains raw event data for 90 days. Your committed daily snapshots in snapshots/tracking-YYYY-MM-DD.json serve as the long-term archive beyond that window. The hourly snapshot files created in step 2 are permanent — they live in the repo and are not subject to any retention limit.

Build docs developers (and LLMs) love