About: generalized specialist - software engineer and data scientist - particularly fond of Python and R
Location:
New York metropolitan area
Joined:
Oct 5, 2020
How to Enable Google Analytics Tracking in Your Greening-Deployed Site
Publish Date: Apr 5
0 0
Want to track visitors to your open-source project site or personal portfolio? Greening makes it easy to wire up Google Analytics — no manual editing required.
Hey! My name's Chris Greening and I'm a software developer from the New York metro area with a diverse range of engineering experience - beam me a message and let's build something great!
christophergreening.com
With just a few lines in your greening.yaml config, you can automatically include a Google Analytics tracking ID in your deployed GitHub Pages site.
🧠 Why This Is Useful
Traditional static site setups (Jekyll, Hugo, etc.) require you to:
Manually edit template files or _config.yml
Copy and paste Google scripts
Hope nothing breaks in the build
Greening skips all that. Just provide your tracking tag, and it handles the rest.
📈 What You’ll Need
A Google Analytics 4 property
The Measurement ID (e.g., G-XXXXXXXXXX)
A Greening project with a configured greening.yaml
In your project’s root directory, open or create a greening.yaml file and add:
google_analytics:G-XXXXXXXXXX
Replace G-XXXXXXXXXX with your actual tag.
🚀 Step 3: Deploy Your Site
Run the following command to generate and publish your GitHub Pages site:
greening deploy
Greening will:
Render your site using Jekyll and the Minimal Mistakes theme
Inject your analytics tag automatically
Push it to the gh-pages branch
✅ You’re Done!
Visit your site, and you’ll start seeing traffic data appear in your GA4 dashboard — no manual setup, no scripts to mess with.
Greening’s mission is to make launching, documenting, and deploying projects fast, beautiful, and automated. Adding analytics should never be the bottleneck.
greening is an opinionated, lightweight project automation tool for solo developers and creative coders. With just a few commands, you can scaffold a production-ready Python package — complete with docs, tests, GitHub Actions workflows, PyPI packaging, and an auto-deployed GitHub Pages site. No boilerplate. No setup hell. Just instant polish.
🌱 Greening
greening is an opinionated, full-stack project automation tool for solo developers and creative coders.
With just a few commands, you can scaffold a production-ready Python package — complete with docs, tests, GitHub Actions workflows, PyPI packaging, and an auto-deployed GitHub Pages site
No boilerplate. No setup hell. Just instant polish.
🤔 Why greening?
Most devs never ship their tools — not because the code isn’t good, but because the surrounding friction is too high:
How do I structure the project?
How do I set up CI/CD, tests, and linting?
How do I make it look legit?
How do I talk about it?
greening answers all of that in one opinionated workflow.
⚙️ What It Does
greening automates your project creation pipeline:
✅ greening init – generates a starter greening.yaml config file
✅ greening new – scaffolds your entire Python project in-place
✅ greening deploy – builds…