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.

Cloudflare Web Analytics is a free, cookieless analytics service that tracks page views without requiring cookie consent banners. It is injected into index.html by apply-theme.py when cfAnalyticsToken is set in config.js — no npm packages, no bundler, and no changes to your app code required.

Setup

1

Create a free Cloudflare account

Sign up at dash.cloudflare.com/sign-up if you don’t already have one. The Web Analytics feature is available on the free tier with no credit card required.
2

Add your site in Web Analytics

In the Cloudflare dashboard sidebar, click Web AnalyticsAdd a site. Enter your site’s domain (e.g. sbburritoweekmap.com).
3

Copy the token

After adding your site, Cloudflare shows a JavaScript snippet. Copy the token — it’s the hex string value inside the snippet, something like f1a2b3c4d5e6f7g8h.
4

Paste the token into config.js

Open config.js and set the cfAnalyticsToken field:
cfAnalyticsToken: "f1a2b3c4d5e6f7g8h",
5

Run apply-theme.py

python3 apply-theme.py
The script reads cfAnalyticsToken from config.js and injects the Cloudflare Web Analytics <script> snippet into index.html. If the token is null, the snippet is removed entirely.
6

Commit and push

git add index.html config.js
git commit -m "Enable Cloudflare Web Analytics"
git push
Page view data will start appearing in your Cloudflare Web Analytics dashboard within a few minutes of your first visitor.
The analytics token is public — it lives in client-side JavaScript and is visible in your page source. This is expected behaviour; Cloudflare Web Analytics is designed this way. Setting cfAnalyticsToken: null in config.js and re-running apply-theme.py removes the snippet entirely if you want to disable analytics.
Web Analytics and the click-tracking Worker serve different purposes. Web Analytics tracks page views — how many people visited your map and from where. The Cloudflare Worker (configured via trackUrl) tracks per-restaurant engagement events like popup views, direction clicks, shares, and upvotes, and powers the /stats leaderboard. You can use either, both, or neither.

Build docs developers (and LLMs) love