• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
nbbaier

nbbaier

counterTown

Public
Like
counterTown
Home
Code
17
.git
10
ARCHITECTURE.md
AnalyticsContext.tsx
Dashboard.tsx
README.md
SitesSection.tsx
TopPathsSection.tsx
TopReferrersSection.tsx
VisitorOriginsSection.tsx
chartCard.tsx
counterTown.tsx
counterTownClient.tsx
formatSiteName.tsx
personalData.tsx
statCard.tsx
valTownAnalytics.tsx
visitorGlobe.tsx
Environment variables
Branches
1
Pull requests
Remixes
1
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
1/26/2026
Viewing readonly version of main branch: v73
View latest version
README.md

Counter Town

a real-time web analytics tracker and dashboard

  • easy setup
  • live analytics
  • track multiple sites from a single dashboard
  • free and fully hosted on val town

inspired by projects like Udara's Stats and Martin's GoatCounter

getting started

  1. fork this val

  2. initialize the database tables

    • the tables should initialize automatically when you first run this val
    • if you need to manually initialize, you can call the initAnalytics() function from the webAnalyticsMod
  3. configure mySitesConfig

    • find the mySitesConfig object
    • update the fields with your information
    • make sure to add the URLs of the sites you want to track to the allowedOrigins field
  4. add the tracking script to your sites

    • place the following script tag just before the closing </body> tag of each site you want to track
    <script> (function() { var script = document.createElement('script'); script.async = true; script.src = 'https://<your-username>-mysitesserver.web.val.run/trackingScript'; var firstScript = document.getElementsByTagName('script')[0]; firstScript.parentNode.insertBefore(script, firstScript); })(); </script>
    • make sure to replace <your-username> with your Val Town username
    • here's the script in my personal site

Migrated from folder: counter_town/counterTown

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.