seo-affiliate-compliance
Implement SEO metadata and affiliate compliance assets such as disclosures, sitemap, and robots.txt.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
Use this skill when generating metadata, discovery files, or compliance content.
Guidelines:
- Generate SEO-friendly metadata: title, description, canonical, and Open Graph tags.
- Add or update sitemap.xml and robots.txt for static hosting.
- Provide affiliate disclosure and disclaimer pages when applicable.
- Avoid deceptive or policy-violating claims; do not imply personal testing.
Current compliance status (January 2026):
- Disclaimer page: /disclaimer (includes affiliate disclosure)
- Privacy Policy: /privacy (includes Google Analytics, AdSense, cookies)
- ads.txt: /public/ads.txt (Google AdSense publisher ID)
- robots.txt: Generated at build time via /scripts/generate-sitemap.mjs (Allow: /)
- sitemap.xml: Generated at build time, submitted to Google Search Console
AdSense compliance checklist:
- Sufficient original content (25+ posts, 900-1500 words each)
- Clear site navigation (Header: Home, Blog, About; Footer: Disclaimer, Privacy)
- No prohibited content (adult, violence, drugs, etc.)
- No deceptive practices (fake buttons, misleading claims)
- Affiliate content adds value beyond just links (guides, comparisons, tips)
- robots.txt allows all crawlers
Google Analytics 4 (GA4) implementation:
- Measurement ID: G-7L8HGVP5MZ (defined in src/lib/site.ts)
- Implementation: Cookie consent-based loading in CookieConsent.tsx
- CRITICAL: The gtag function MUST use
argumentsobject, NOT rest parameters// CORRECT - gtag.js expects Arguments objects in dataLayer function gtag() { dataLayer.push(arguments); } // WRONG - Arrays are NOT processed correctly by gtag.js function gtag(...args) { dataLayer.push(args); } - Standard initialization order:
- Initialize dataLayer array
- Define gtag function using
arguments - Call gtag("js", new Date())
- Call gtag("config", "G-MEASUREMENT_ID")
- Load gtag.js script asynchronously
- The collect request (sending data to GA) only works when dataLayer contains Arguments objects
- Do NOT add AnalyticsTracker components or manual page view tracking - let GA4 handle it automatically
Per-post affiliate disclosure:
- NOT required (removed per user preference)
- Site-wide Disclaimer page handles this
- Do not add disclosure blocks to individual blog posts
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!