ga4-analytics

Analyze website traffic, demographics, and SEO via GA4 and Search Console APIs.

Updated Mar 10, 2026
One-click install
npx skills add https://github.com/darblex/price-compare-israel --skill ga4-analytics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ga4-analytics
Source: https://github.com/darblex/price-compare-israel/tree/main/workspace/skills/ga4-analytics
Command: npx skills add https://github.com/darblex/price-compare-israel --skill ga4-analytics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @google-analytics/data, @googleapis/indexing, @googleapis/searchconsole, dotenv, googleapis, tsx, typescript, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides deep insights into website traffic, user behavior, and SEO performance by integrating data from Google Analytics 4 and Google Search Console.

Core Features & Use Cases

  • Website Traffic Analysis: Understand page views, sessions, users, and traffic sources.
  • SEO Performance: Analyze top search queries, clicks, impressions, and indexed URLs.
  • Real-time Monitoring: View live visitor data and currently viewed pages.
  • Use Case: A marketing manager can use this Skill to quickly generate a report on website traffic sources for the last quarter and identify the top-performing content.

Quick Start

Show me the site traffic overview for the last 30 days.

Frequently Asked Questions about ga4-analytics

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

FAQPage Schema
How do I analyze website traffic and user demographics using Google Analytics 4?

You can analyze website traffic and user demographics using Google Analytics 4 by connecting a Google Cloud service account to the GA4 Data API, which retrieves metrics on page views, sessions, active users, and audience demographics for your specified time ranges.

How do I check search queries and URL indexing status with Google Search Console?

Check search queries and URL indexing status with Google Search Console by accessing the Search Console API. It returns data on top search queries, clicks, impressions, and allows you to inspect the current indexing status of specific URLs.

Do I need a Google Cloud service account to access GA4 and Search Console data?

Yes, you need a Google Cloud service account configured with proper API access to retrieve GA4 and Search Console data. The service account credentials authenticate your requests to the Google Analytics Data and Search Console APIs.

Can I monitor real-time website traffic and live page views through GA4?

Yes, you can monitor real-time website traffic and live page views through GA4 by querying the real-time reporting features of the Google Analytics Data API, which shows active visitors and currently viewed pages.

What is the best way to integrate SEO performance data with website traffic sources?

The best way to integrate SEO performance data with website traffic sources is by querying both the GA4 and Search Console APIs simultaneously, correlating top search queries and indexing status with page views and session metrics.

Why does my GA4 API request fail to return website traffic data?

Your GA4 API request fails to return website traffic data when your Google Cloud service account lacks the required GA4 Data API permissions, or when the environment variables for authentication are not properly configured in your dotenv file.