3.1 KiB
3.1 KiB
Google Search Console Monitoring Setup
✅ What's Been Created
I've created a complete automated monitoring system in scripts/gsc-monitoring/:
Files Created:
- monitor.py - Python script that fetches GSC data
- requirements.txt - Python dependencies
- Dockerfile - Container image definition
- cronjob.yaml - Kubernetes CronJob for daily runs
- README.md - Full setup documentation
What It Monitors:
- ✅ Search analytics (clicks, impressions, CTR, position)
- ✅ Top 5 search queries daily
- ✅ Crawl errors
- ✅ Sitemap status
- ✅ Runs daily at 9 AM UTC
🚀 Next Steps (Do These Now)
Step 1: Create Google Cloud Project
- Go to https://console.cloud.google.com
- Create new project named
manoonoils-monitoring - Enable "Google Search Console API" in APIs & Services → Library
Step 2: Create Service Account
- Go to IAM & Admin → Service Accounts
- Create service account:
gsc-monitor - Grant role: "Search Console Viewer" (or "Owner")
Step 3: Download Key
- Click on the service account → Keys tab
- Add Key → Create New Key → JSON
- Download and save the JSON file
Step 4: Add to Search Console
- Go to https://search.google.com/search-console
- Select
manoonoils.comproperty - Settings → Users and Permissions → Add User
- Add the service account email from the JSON file
- Permission level: "Full"
Step 5: Deploy to Kubernetes
Run on your server:
# Copy the JSON key to your server
scp /path/to/downloaded-key.json doorwaysftw:/tmp/gsc-key.json
# Create the Kubernetes secret
ssh doorwaysftw "kubectl create secret generic gsc-service-account \
--namespace=manoonoils \
--from-file=service-account.json=/tmp/gsc-key.json"
# Deploy the monitoring CronJob
ssh doorwaysftw "kubectl apply -f -" < scripts/gsc-monitoring/cronjob.yaml
# Verify it's scheduled
ssh doorwaysftw "kubectl get cronjob gsc-monitoring -n manoonoils"
📊 Viewing Reports
Check Latest Report:
ssh doorwaysftw "kubectl create job --from=cronjob/gsc-monitoring gsc-manual-test -n manoonoils
sleep 10
kubectl logs job/gsc-manual-test -n manoonoils
kubectl delete job gsc-manual-test -n manoonoils"
Reports include:
- Total clicks & impressions (last 7 days)
- Average CTR and position
- Top 5 search queries
- Crawl errors summary
- Sitemap status
🔒 Security
- Service account has read-only access to GSC
- Credentials stored as Kubernetes Secret
- JSON key never committed to git
- Rotate key every 90 days
📚 Full Documentation
See scripts/gsc-monitoring/README.md for:
- Detailed setup instructions
- Troubleshooting guide
- Updating the monitor
- Changing schedule
⏱️ Timeline
Setup time: 10-15 minutes First report: After setup (manual run) or next day (automatic) Data availability: 48-72 hours after setup (Google processes data)
❓ Questions?
The README.md has full troubleshooting. Common issues:
- "User does not have permission" → Wait 5-10 min after adding to GSC
- "Site not found" → Verify URL in monitor.py matches exactly
Ready to proceed? Start with Step 1 above!