=== Google Ads API Test Scripts Usage Guide === These scripts have been updated to accept keywords as command line arguments and include BigQuery verification. 1. COMPREHENSIVE API + BIGQUERY TEST: php test_sportandem_keyword.php [keyword] Examples: - php test_sportandem_keyword.php SportandemBotellas - php test_sportandem_keyword.php "water bottle" - php test_sportandem_keyword.php laptop - php test_sportandem_keyword.php (uses default: SportandemBotellas) Features: API call, data parsing, BigQuery insertion, data verification 2. BIGQUERY DATA VERIFICATION ONLY: php test_bigquery_verification.php [keyword] [client] Examples: - php test_bigquery_verification.php SportandemBotellas - php test_bigquery_verification.php "water bottle" TEST_CLIENT - php test_bigquery_verification.php (uses default: SportandemBotellas) Features: Check existing data, data quality analysis, recent activity 3. FULL WORKFLOW TEST: php test_job_workflow.php [keyword] Examples: - php test_job_workflow.php SportandemBotellas - php test_job_workflow.php "fitness tracker" - php test_job_workflow.php (uses default: SportandemBotellas) Features: Service testing, job execution, API call verification 4. ARTISAN COMMAND: php artisan googleads:test-keyword [keyword] [options] Examples: - php artisan googleads:test-keyword SportandemBotellas - php artisan googleads:test-keyword "smart phone" --language=1000 --location=2826 - php artisan googleads:test-keyword (uses default: SportandemBotellas) Features: API call with detailed results display 5. ORIGINAL TEST (no arguments): php test_google_ads.php (Uses hardcoded 'test keyword') === What Each Test Does === COMPREHENSIVE TEST (test_sportandem_keyword.php): ✓ Makes Google Ads API call ✓ Parses response data ✓ Inserts data into BigQuery tables ✓ Verifies data was stored correctly ✓ Shows sample data from BigQuery ✓ Provides performance metrics BIGQUERY VERIFICATION (test_bigquery_verification.php): ✓ Checks existing data in BigQuery ✓ Shows data summary and statistics ✓ Displays sample records ✓ Checks recent activity (last 24 hours) ✓ Performs data quality analysis ✓ Shows data completeness metrics === Language and Location IDs === Default settings: - Language ID: 1000 (English) - Location ID: 2826 (United States) Common Language IDs: - 1000: English - 1001: Spanish - 1002: French - 1003: German - 1004: Italian - 1005: Portuguese Common Location IDs: - 2826: United States - 2826: United Kingdom - 2276: Canada - 2274: Australia - 2826: Germany === BigQuery Tables === The system uses these BigQuery tables: - aquila.gads_keywordMetrics: Keyword performance data - aquila.gads_keywordMonthlySearchVolumes: Monthly search trends - aquila.gads_requests: Request tracking === Notes === - Keywords with spaces should be quoted: "water bottle" - If no keyword is provided, 'SportandemBotellas' will be used as default - All tests use the updated V19 Google Ads API - BigQuery tests use unique client identifiers to avoid conflicts - Data verification includes quality checks and completeness analysis === Example Usage Workflow === 1. Test a new keyword with full verification: php test_sportandem_keyword.php "your new keyword" 2. Check existing data for a keyword: php test_bigquery_verification.php "your keyword" 3. Test multiple keywords quickly: php test_sportandem_keyword.php keyword1 && php test_sportandem_keyword.php keyword2 4. Verify data quality for a specific client: php test_bigquery_verification.php "your keyword" "your_client" === Troubleshooting === If you encounter errors: - Check that BigQuery credentials are properly configured - Verify that the Google Ads API is working (V19) - Ensure the keyword is valid and not empty - Check BigQuery table permissions and structure - Review the detailed error messages for specific issues