add-analytics

Detect project framework and inject Google Analytics 4 scripts.

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/kaifashraff/jarvis-research --skill add-analytics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-analytics
Source: https://github.com/kaifashraff/jarvis-research/tree/main/skills/add-analytics
Command: npx skills add https://github.com/kaifashraff/jarvis-research --skill add-analytics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates GA4 setup across projects by detecting the framework and applying the correct integration pattern.

Core Features & Use Cases

  • Framework detection and automatic GA4 script injection for Next.js, React, Vue, Nuxt, Astro, SvelteKit, and plain HTML.
  • Optional event tracking and cookie-consent configurations to support privacy and conversions.
  • Environment-variable guidance and framework-specific code patterns to accelerate rollout.

Quick Start

Configure GA4 by supplying a GA measurement ID and selecting the target framework; the skill will detect the project type and apply the appropriate integration steps.

Frequently Asked Questions about add-analytics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Google Analytics 4 setup across multiple frameworks?

Automate GA4 setup by detecting the project type and injecting the correct GA4 scripts for frameworks like Next.js, React, Vue, Nuxt, Astro, SvelteKit, and plain HTML. The skill applies framework-specific implementation patterns to accelerate rollout.

Can I add GA4 event tracking and cookie-consent management to my web project?

Yes, you can add GA4 event tracking and cookie-consent configurations during the setup process. These optional features support privacy compliance and conversion tracking alongside the base script injection.

Does this GA4 integration tool support Nuxt, Astro, and SvelteKit projects?

Yes, the GA4 integration tool supports Nuxt, Astro, and SvelteKit projects. It also works with Next.js, React, Vue, and plain HTML by automatically detecting the framework and applying the appropriate integration steps.

What's the best way to validate a GA4 measurement ID and configure environment variables?

The best way to validate a GA4 measurement ID and configure environment variables is to use a skill that enforces measurement ID validation and provides environment-variable guidance. This ensures correct configuration before script injection.

How do I verify that Google Analytics 4 is working correctly after setup?

Verify Google Analytics 4 is working correctly by using the provided verification checklist and debug options. These tools confirm that the GA4 scripts are properly injected and tracking data across your selected framework.