Remove Analytics for Openclaw

A specialized automation for purging Google Analytics tracking code, dependencies, and environment variables from any codebase.

jeftekhari
v0.1.0
Feb 3, 2026
1
2.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install remove-analytics

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install remove-analytics using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Remove Analytics?

This skill provides a safe and systematic way to remove Google Analytics integration from your software projects. Whether you are switching to a privacy-focused alternative or simplifying your tech stack, this tool ensures no orphaned scripts, packages, or environment variables are left behind. As part of the Openclaw Skills ecosystem, it handles the complex task of identifying tracking hooks across diverse frameworks.

By automating the discovery of gtag scripts and analytics components, the skill reduces the risk of broken builds or lingering tracking snippets. It prioritizes safety by requiring explicit user confirmation before executing any destructive actions, making it a reliable choice for maintaining clean and compliant repositories.

Remove Analytics Use Cases

  • Migrating away from Google Analytics to privacy-first tracking solutions.
  • Cleaning up legacy tracking code from inherited repositories.
  • Reducing bundle size by removing unnecessary analytics dependencies and gtag scripts.
  • Ensuring compliance with strict data privacy requirements by purging all tracking hooks.

How Remove Analytics Works

  1. The agent initiates a confirmation protocol to ensure the user intends to perform this destructive action and understands the impact.
  2. It performs a comprehensive scan of the codebase for keywords like gtag, dataLayer, and GoogleAnalytics to find all instances of tracking code.
  3. The skill identifies associated npm packages such as react-ga4 or vue-gtag and schedules them for removal from package.json.
  4. It locates and removes tracking scripts, utility files, and orphaned environment variables like GA_MEASUREMENT_ID from configuration files.
  5. Finally, it provides a detailed report of all modified files, deleted assets, and uninstalled packages for the user to review.

Remove Analytics Setup

To use this skill within your development environment, ensure you have the Openclaw Skills framework installed and the agent configured for your target project.

# Access the remove-analytics skill via your AI coding agent
openclaw run remove-analytics

Remove Analytics Data Schema & Taxonomy

The skill identifies and processes the following technical metadata and file structures:

Category Patterns & Targets
Scripts googletagmanager.com, gtag.js
Variables GA_, GTAG_, MEASUREMENT_ID
Packages @types/gtag.js, react-ga4, vue-gtag
Logic dataLayer, GoogleAnalytics, analytics-utils

Remove Analytics Advanced Features

  • Multi-package manager support for comprehensive dependency cleanup via npm, yarn, or pnpm.
  • Automatic synchronization of .env.example files to prevent leaking or retaining unused analytics keys.
  • Intelligent detection of orphaned imports in React, Vue, and plain JavaScript files.
  • High-fidelity reporting that lists every modified line of code for audit trails.
  • Context-aware identification of Google Tag Manager components beyond simple script tags.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*