Google Search Console Integration

Track search performance, answer engine (AEO) questions, keyword rankings, and indexing status through Google Search Console API integration.

Google Search Console Integration Available
Access real search performance data through our GSC client

GTM Toolkit includes a complete Google Search Console client that can fetch search analytics, answer engine questions (AEO queries), keyword performance, and indexing status. Connect your verified property so you can see the exact questions bots and AI surfaces are asking about your site.

# Example: Using GSC client in your code
import fs from 'node:fs';
import { GoogleSearchConsoleClient } from 'gtm-toolkit';
const raw = fs.readFileSync('service-account.json', 'utf8');
const credentials = JSON.parse(raw);
const gsc = new GoogleSearchConsoleClient(credentials, 'https://example.com');
const report = await gsc.getSearchAnalytics({ startDate: "2024-01-01", endDate: "2024-01-31" });
AI Answer Engine Optimization
Capture the questions AI assistants ask about your brand

When Google Search Console is connected and Generative Optimization is enabled, gtm-toolkit generate --all writes reports/ai-overview-keywords.csv. This export isolates AI Overview and answer-engine style queries so you can prioritize briefs that bots already associate with your site.

query,search_intent,ai_overview,impressions,clicks
"what is raz kaplan toolkit",informational,yes,120,34
"gtm as code playbook",commercial_investigation,yes,58,11
"raz kaplan pricing",transactional,no,42,9
  • • Spot which questions answer engines already surface for your domain.
  • • Feed the CSV back into gtm-toolkit analyze --keywords for assistant-ready follow-up prompts.
  • • Share findings with marketing so landing pages and docs address high-value AI Overview queries.
SEO Audit and Scoring
Built-in content analysis and SEO scoring capabilities

Content Audit

# Run a full audit pass
gtm-toolkit audit --all
# Content-only
gtm-toolkit audit --content
# Technical-only
gtm-toolkit audit --technical

SEO Linting

# Lint content against 50+ SEO rules
gtm-toolkit lint content/ --format console
# Get JSON output for CI/CD integration
gtm-toolkit lint content/ --format json > results.json

What Gets Analyzed

Content Structure
• Title optimization (45-70 chars)
• Meta descriptions (120-160 chars)
• Heading hierarchy (H1, H2, H3)
• Internal linking patterns
Technical SEO
• Image alt text compliance
• Keyword density analysis
• Readability scoring
• Markdown syntax validation
Frontmatter Validation
• Required fields presence
• Date format validation
• Category compliance
• Reading time calculation
Content Quality
• Word count targets
• Placeholder content detection
• Link quality analysis
• Duplicate content checks
Google Search Console Features
Available GSC integration capabilities
Available Methods
Search Analytics
✓ Available
Keyword Performance
✓ Available
Top Pages Analysis
✓ Available
Indexing Status
✓ Available
Site Verification
✓ Available
SEO Insights Generation
✓ Available
Usage Example
// Example GSC integration
import fs from 'node:fs';
import { GoogleSearchConsoleClient } from 'gtm-toolkit';
const raw = fs.readFileSync(process.env.GSC_KEY_PATH ?? 'service-account.json', 'utf8');
const credentials = JSON.parse(raw);
const client = new GoogleSearchConsoleClient(credentials, 'https://yoursite.com');
const insights = await client.getSearchAnalytics({ startDate: "2024-01-01", endDate: "2024-01-31" });
🔗 Integration Required: This feature requires Google Search Console API credentials and site verification. The client is fully implemented but requires proper setup.
SEO File Generation
Generate essential SEO files for your website

Available Generators

# Generate robots.txt with AI bot controls
gtm-toolkit generate --robots
# Generate comprehensive sitemap.xml
gtm-toolkit generate --sitemap
# Generate all SEO files
gtm-toolkit generate --all
Smart Robots.txt
Includes AI bot controls for GPT, Claude, Bing AI with customizable rules
✓ Implemented
Dynamic Sitemap
Auto-generates from content with priority scoring and image support
✓ Implemented
Programmatic Usage
Use GTM Toolkit features in your own applications
// Import available functions
import {
lintContent,
summarizeLintResults,
generateRobots,
generateSitemap,
GoogleSearchConsoleClient
} from 'gtm-toolkit'
// Lint content
const results = lintContent(markdown, { filename: 'post.md' })
const summary = summarizeLintResults(results)
// Generate files (requires a GTMConfig instance)
const gtmConfig = require('../gtm.config.js');
// customRules expects RobotRule objects with userAgent/allow/disallow fields
const robots = generateRobots(gtmConfig, {
customRules: [{ userAgent: 'GPTBot', disallow: ['/lab/'] }]
});
const sitemap = await generateSitemap(gtmConfig, {
staticPages: ['/', '/docs', '/pricing']
});