#!/bin/bash # Daily SEO Report - 8 AM UTC WORKSPACE="/Users/claw/.openclaw/workspace/agents/marketing-seo" LOG="$WORKSPACE/logs" cd $WORKSPACE # Get GA4 data GA=$(python3 scripts/ga4-direct.py 2>/dev/null | grep -A3 "Traffic Data") SESSIONS=$(echo "$GA" | grep Sessions | grep -o "[0-9]*") USERS=$(echo "$GA" | grep Users | grep -o "[0-9]*") # Get site status WWW_UP=$(curl -s -o /dev/null -w "%{http_code}" https://www.hoaledgeriq.com -m 10) APP_UP=$(curl -s -o /dev/null -w "%{http_code}" https://app.hoaledgeriq.com -m 10) # Rankings RANK_STATUS="Establishment phase (not yet in top 100)" # Send Telegram report MSG="📊 *DAILY SEO REPORT* - $(date '+%a %b %d') 🌐 *Sites:* ✅ www.hoaledgeriq.com: ${WWW_UP} ✅ app.hoaledgeriq.com: ${APP_UP} 📈 *Traffic (24h):* • Sessions: ${SESSIONS:-0} • Users: ${USERS:-0} 📈 *Rankings:* ${RANK_STATUS} • 8 keywords tracked • Baseline established • Monitoring for break-through ⚡ Status: Healthy ✅" openclaw message send --channel telegram --target telegram:8269921691 --message "$MSG" 2>/dev/null || echo "$MSG" >> "$LOG/daily-$(date +%Y%m%d).log" echo "Report sent: $(date)" >> "$LOG/report-sent.log"