GTM Toolkit
Developer-Native Marketing
Google Search Console Integration
Track search performance, 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, keyword performance, and indexing status. This requires proper GSC API credentials and site verification.
# 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" });
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
• 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
• Keyword density analysis
• Readability scoring
• Markdown syntax validation
Frontmatter Validation
• Required fields presence
• Date format validation
• Category compliance
• Reading time calculation
• Date format validation
• Category compliance
• Reading time calculation
Content Quality
• Word count targets
• Placeholder content detection
• Link quality analysis
• Duplicate content checks
• 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']
});