You'll get:
- ✅ A mobile-friendly page with directions
- ✅ Free hosting on GitHub Pages
- ✅ Free analytics via GoatCounter (page views, devices, locations)
- ✅ Optional: Detailed click tracking via Google Sheets
Open: https://github.com/new
- Repository name:
backgate-guide(or any name you prefer) - Description: Back entrance navigation for IT Park
- Select: ✅ Public
- Select: ✅ Add a README file
- Click "Create repository"
- In your new repository, click "Add file" → "Upload files"
- Drag and drop the
index.htmlfile - Click "Commit changes"
- Go to repository Settings (tab at top)
- Scroll down to "Pages" in left sidebar
- Under "Source", select "Deploy from a branch"
- Select branch: main, folder: / (root)
- Click Save
- Wait 1-2 minutes, then your site will be live at:
https://YOUR_USERNAME.github.io/backgate-guide/
GoatCounter is free, privacy-friendly, and shows you:
- Total page views
- Unique visitors
- Device types (Mobile/Desktop)
- Browsers
- Countries/Regions
- Which buttons people click
- Go to: https://www.goatcounter.com/signup
- Enter:
- Code:
itpark-backgate(this becomes your dashboard URL) - Email: Your email
- Password: Choose one
- Code:
- Click "Create"
- After signup, you'll get a code like:
itpark-backgate - Open your
index.htmlfile in GitHub - Click the pencil icon to edit
- Find this line (near the top):
<script data-goatcounter="https://YOUR_GOATCOUNTER_CODE.goatcounter.com/count"
- Replace
YOUR_GOATCOUNTER_CODEwith your actual code (e.g.,itpark-backgate) - Click "Commit changes"
Go to: https://YOUR_CODE.goatcounter.com
Example: https://itpark-backgate.goatcounter.com
- Go to: https://www.qrcode-monkey.com/
- Enter your GitHub Pages URL:
https://YOUR_USERNAME.github.io/backgate-guide/ - Customize colors (optional):
- Body: #3b82f6 (blue)
- Background: #ffffff (white)
- Download PNG (high resolution)
- Update the URL in the Python script provided and regenerate
For tracking EVERY click with full device details, set up Google Sheets logging:
- Go to: https://sheets.google.com
- Create new spreadsheet named "BackGate Analytics"
- Add headers in Row 1:
Timestamp | Action | Device | OS | Browser | Screen | Language | Timezone
- In your Sheet, go to Extensions → Apps Script
- Delete default code and paste:
function doPost(e) {
try {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
const data = JSON.parse(e.postData.contents);
sheet.appendRow([
new Date().toISOString(),
data.action || '',
data.device || '',
data.os || '',
data.browser || '',
(data.screenWidth || '') + 'x' + (data.screenHeight || ''),
data.language || '',
data.timezone || ''
]);
return ContentService
.createTextOutput(JSON.stringify({status: 'success'}))
.setMimeType(ContentService.MimeType.JSON);
} catch(error) {
return ContentService
.createTextOutput(JSON.stringify({status: 'error', message: error.toString()}))
.setMimeType(ContentService.MimeType.JSON);
}
}- Click Deploy → New deployment
- Select type: Web app
- Set:
- Execute as: Me
- Who has access: Anyone
- Click Deploy and copy the Web App URL
- Edit
index.htmlon GitHub - Find this line:
GOOGLE_SCRIPT_URL: '',
- Add your Web App URL:
GOOGLE_SCRIPT_URL: 'https://script.google.com/macros/s/YOUR_SCRIPT_ID/exec',
- Commit changes
Now every click logs to your Google Sheet with full device info! 📊
After setup, you'll have:
| What | URL |
|---|---|
| QR Code Landing Page | https://YOUR_USERNAME.github.io/backgate-guide/ |
| Analytics Dashboard | https://YOUR_CODE.goatcounter.com |
| Detailed Logs (optional) | Your Google Sheet |
- Go to your GitHub repository
- Click on
index.html - Click the pencil icon to edit
- Make changes
- Click "Commit changes"
- Changes go live in ~1 minute!
For best results:
- Print at minimum 2cm x 2cm (0.8 inch)
- Use high contrast (dark QR on white background)
- Laminate for outdoor use
- Test scanning before mass distribution!
Common issues:
- Page not loading: Wait 5 minutes after enabling GitHub Pages
- Analytics not showing: Check that GoatCounter code is correct
- QR not scanning: Make sure URL is exactly right, no typos