# Config Setup Guide ## 1. Copy template ```bash cp config/clients-config.template.json ~/vault/99_System/clients-config.json ``` ## 2. Fill in global credentials ### Google (for GSC + Google Ads) - `service_account_key` — path to service account JSON key file - `developer_token` — from Google Ads → Tools → API Center - `manager_account_id` — MCC account ID (format: 123-456-7890) ### Meta (for Facebook/Instagram Ads) - `app_id` — from developers.facebook.com → App Settings - `app_secret` — from developers.facebook.com → App Settings → Basic - `system_user_token` — Business Settings → System Users → Generate Token ## 3. Add clients Each client needs: - `id` — unique kebab-case identifier - `display_name` — human-readable name - `contact` — phone, email, line (browsed from website) - `website` — type (astro/wordpress), url - `social_platforms` — which platforms to use (e.g. ["facebook"]) - `analytics` — GSC property, GA ID, Google Ads ID, Meta Ads ID ## 4. Set up GSC access Add service account email as user in each client's GSC property: 1. Go to https://search.google.com/search-console 2. Select client's property 3. Settings → Users and permissions → Add user 4. Email: [from service_account_key → client_email] 5. Permission: Full or Restricted ## 5. Verify ```bash cd ~/Gitea/moreminimore-service-system/scripts python3 mm_gsc.py --client --days 7 python3 mm_google_ads.py --client campaigns python3 mm_meta_ads.py --client campaigns ```