SEO Google
AgriciDaniel/codex-seo
Google SEO APIs: Search Console (Search Analytics, URL Inspection, Sitemaps), PageSpeed Insights v5, CrUX field data with 25-week history, Indexing API v3, and GA4 organic traffic.
Add Google Analytics 4 tracking to any project. An agent skill from LeoYeAI/openclaw-master-skills.
$ npx skills add LeoYeAI/openclaw-master-skills --skill add-analytics -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills add-analytics --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/add-analytics .claude/skills/add-analytics && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "add-analytics" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-analytics into .claude/skills/add-analytics/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-analytics", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-analyticsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add LeoYeAI/openclaw-master-skills --skill add-analytics -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills add-analytics --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/add-analytics .agents/skills/add-analytics && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "add-analytics" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-analytics into .agents/skills/add-analytics/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-analytics", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill add-analytics -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills add-analytics --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/add-analytics .cursor/skills/add-analytics && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "add-analytics" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-analytics into .cursor/skills/add-analytics/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-analytics", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/LeoYeAI/openclaw-master-skills.git --path skills/add-analytics--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add LeoYeAI/openclaw-master-skills --skill add-analytics -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills add-analytics --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/add-analytics .gemini/skills/add-analytics && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "add-analytics" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-analytics into .gemini/skills/add-analytics/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-analytics", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install LeoYeAI/openclaw-master-skills add-analyticsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add LeoYeAI/openclaw-master-skills --skill add-analytics -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/add-analytics .github/skills/add-analytics && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "add-analytics" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-analytics into .github/skills/add-analytics/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-analytics", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill add-analytics -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills add-analytics --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/add-analytics .opencode/skills/add-analytics && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "add-analytics" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/add-analytics into .opencode/skills/add-analytics/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-analytics", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
add-analyticsAdd Google Analytics 4 tracking to any project. An agent skill from LeoYeAI/openclaw-master-skills.
Add Analytics is an agent skill from LeoYeAI/openclaw-master-skills. Add Google Analytics 4 tracking to any project. Detects framework, adds tracking code, sets up events, and configures privacy settings.
Its SKILL.md is about 4.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `_meta.json`).
It sits in Frontend & Design. It works with Google Analytics. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.
10 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript, astro, bash, svelte and html).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
googletagmanager.comsupport.google.comAlso links to:
chrome.google.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Add Analytics loads about 4.6k tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 469 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
Create or update `.env` / `.env.local`:**IMPORTANT**: Add `.env.local` to `.gitignore` if not already present.Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 469 words, ~4,564 tokens.
.claude/skills/add-analytics/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.You are setting up Google Analytics 4 (GA4) for a project. Follow this comprehensive guide to add analytics properly.
Parse the following from $ARGUMENTS:
G-XXXXXXXXXX (required, ask if not provided)Scan the project to determine the framework/setup:
Priority detection order:
1. next.config.js/ts → Next.js
2. nuxt.config.js/ts → Nuxt.js
3. astro.config.mjs → Astro
4. svelte.config.js → SvelteKit
5. remix.config.js → Remix
6. gatsby-config.js → Gatsby
7. vite.config.js + src/App.vue → Vue + Vite
8. vite.config.js + src/App.tsx → React + Vite
9. angular.json → Angular
10. package.json with "react-scripts" → Create React App
11. index.html only → Plain HTML
12. _app.tsx/jsx → Next.js (App Router check: app/ directory)Also check for:
The Measurement ID must:
G- (GA4 format)G-ABC1234567If the user provides a UA- ID, inform them:
"You provided a Universal Analytics ID (UA-). GA4 uses Measurement IDs starting with 'G-'. Universal Analytics was sunset in July 2024. You'll need to create a GA4 property at analytics.google.com"
Create app/layout.tsx modification or create components/GoogleAnalytics.tsx:
// components/GoogleAnalytics.tsx
'use client'
import Script from 'next/script'
interface GoogleAnalyticsProps {
measurementId: string
}
export function GoogleAnalytics({ measurementId }: GoogleAnalyticsProps) {
return (
<>
<Script
src={`https://www.googletagmanager.com/gtag/js?id=${measurementId}`}
strategy="afterInteractive"
/>
<Script id="google-analytics" strategy="afterInteractive">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${measurementId}');
`}
</Script>
</>
)
}Add to root layout:
// app/layout.tsx
import { GoogleAnalytics } from '@/components/GoogleAnalytics'
// Add inside <body> or <html>:
<GoogleAnalytics measurementId="G-XXXXXXXXXX" />Modify pages/_app.tsx:
// pages/_app.tsx
import type { AppProps } from 'next/app'
import Script from 'next/script'
const GA_MEASUREMENT_ID = process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID
export default function App({ Component, pageProps }: AppProps) {
return (
<>
<Script
src={`https://www.googletagmanager.com/gtag/js?id=${GA_MEASUREMENT_ID}`}
strategy="afterInteractive"
/>
<Script id="google-analytics" strategy="afterInteractive">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${GA_MEASUREMENT_ID}');
`}
</Script>
<Component {...pageProps} />
</>
)
}Create src/lib/analytics.ts:
// src/lib/analytics.ts
export const GA_MEASUREMENT_ID = import.meta.env.VITE_GA_MEASUREMENT_ID
declare global {
interface Window {
gtag: (...args: unknown[]) => void
dataLayer: unknown[]
}
}
export const initGA = () => {
if (typeof window === 'undefined') return
const script = document.createElement('script')
script.src = `https://www.googletagmanager.com/gtag/js?id=${GA_MEASUREMENT_ID}`
script.async = true
document.head.appendChild(script)
window.dataLayer = window.dataLayer || []
window.gtag = function gtag() {
window.dataLayer.push(arguments)
}
window.gtag('js', new Date())
window.gtag('config', GA_MEASUREMENT_ID)
}
export const pageview = (url: string) => {
window.gtag('config', GA_MEASUREMENT_ID, {
page_path: url,
})
}
export const event = (action: string, params?: Record<string, unknown>) => {
window.gtag('event', action, params)
}Initialize in src/main.tsx:
import { initGA } from './lib/analytics'
// Initialize before render
if (import.meta.env.PROD) {
initGA()
}Create src/plugins/analytics.ts:
// src/plugins/analytics.ts
import type { App } from 'vue'
import type { Router } from 'vue-router'
const GA_MEASUREMENT_ID = import.meta.env.VITE_GA_MEASUREMENT_ID
declare global {
interface Window {
gtag: (...args: unknown[]) => void
dataLayer: unknown[]
}
}
export const analyticsPlugin = {
install(app: App, { router }: { router: Router }) {
// Load gtag script
const script = document.createElement('script')
script.src = `https://www.googletagmanager.com/gtag/js?id=${GA_MEASUREMENT_ID}`
script.async = true
document.head.appendChild(script)
window.dataLayer = window.dataLayer || []
window.gtag = function gtag() {
window.dataLayer.push(arguments)
}
window.gtag('js', new Date())
window.gtag('config', GA_MEASUREMENT_ID)
// Track route changes
router.afterEach((to) => {
window.gtag('config', GA_MEASUREMENT_ID, {
page_path: to.fullPath,
})
})
// Provide global methods
app.config.globalProperties.$gtag = window.gtag
}
}Create plugins/analytics.client.ts:
// plugins/analytics.client.ts
export default defineNuxtPlugin(() => {
const config = useRuntimeConfig()
const measurementId = config.public.gaMeasurementId
if (!measurementId) return
// Load gtag
useHead({
script: [
{
src: `https://www.googletagmanager.com/gtag/js?id=${measurementId}`,
async: true,
},
{
innerHTML: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${measurementId}');
`,
},
],
})
// Track route changes
const router = useRouter()
router.afterEach((to) => {
window.gtag('config', measurementId, {
page_path: to.fullPath,
})
})
})Add to nuxt.config.ts:
export default defineNuxtConfig({
runtimeConfig: {
public: {
gaMeasurementId: process.env.NUXT_PUBLIC_GA_MEASUREMENT_ID,
},
},
})Create src/components/Analytics.astro:
---
// src/components/Analytics.astro
interface Props {
measurementId: string
}
const { measurementId } = Astro.props
---
<script
is:inline
define:vars={{ measurementId }}
src={`https://www.googletagmanager.com/gtag/js?id=${measurementId}`}
></script>
<script is:inline define:vars={{ measurementId }}>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', measurementId);
</script>Add to layout:
---
import Analytics from '../components/Analytics.astro'
---
<html>
<head>
<Analytics measurementId="G-XXXXXXXXXX" />
</head>
</html>Create src/lib/analytics.ts and src/routes/+layout.svelte:
// src/lib/analytics.ts
import { browser } from '$app/environment'
export const GA_MEASUREMENT_ID = import.meta.env.VITE_GA_MEASUREMENT_ID
export function initGA() {
if (!browser) return
const script = document.createElement('script')
script.src = `https://www.googletagmanager.com/gtag/js?id=${GA_MEASUREMENT_ID}`
script.async = true
document.head.appendChild(script)
window.dataLayer = window.dataLayer || []
window.gtag = function gtag() {
window.dataLayer.push(arguments)
}
window.gtag('js', new Date())
window.gtag('config', GA_MEASUREMENT_ID)
}
export function trackPageview(url: string) {
if (!browser) return
window.gtag('config', GA_MEASUREMENT_ID, { page_path: url })
}<!-- src/routes/+layout.svelte -->
<script lang="ts">
import { onMount } from 'svelte'
import { page } from '$app/stores'
import { initGA, trackPageview } from '$lib/analytics'
onMount(() => {
initGA()
})
$: if ($page.url.pathname) {
trackPageview($page.url.pathname)
}
</script>
<slot />Add to <head>:
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>Create or update .env / .env.local:
# For Next.js
NEXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX
# For Vite (React/Vue/Svelte)
VITE_GA_MEASUREMENT_ID=G-XXXXXXXXXX
# For Nuxt
NUXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXXAdd to .env.example if it exists (without the actual ID):
# Google Analytics 4 Measurement ID
NEXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXXIMPORTANT: Add .env.local to .gitignore if not already present.
Create a comprehensive events utility:
// lib/analytics-events.ts
/**
* GA4 Event Tracking Utilities
*
* Recommended events: https://support.google.com/analytics/answer/9267735
*/
type GTagEvent = {
action: string
category?: string
label?: string
value?: number
[key: string]: unknown
}
// Core event function
export const trackEvent = ({ action, category, label, value, ...rest }: GTagEvent) => {
if (typeof window === 'undefined' || !window.gtag) return
window.gtag('event', action, {
event_category: category,
event_label: label,
value,
...rest,
})
}
// Engagement events
export const trackClick = (elementName: string, location?: string) => {
trackEvent({
action: 'click',
category: 'engagement',
label: elementName,
click_location: location,
})
}
export const trackScroll = (percentage: number) => {
trackEvent({
action: 'scroll',
category: 'engagement',
value: percentage,
})
}
// Conversion events
export const trackSignUp = (method: string) => {
trackEvent({
action: 'sign_up',
method,
})
}
export const trackLogin = (method: string) => {
trackEvent({
action: 'login',
method,
})
}
export const trackPurchase = (params: {
transactionId: string
value: number
currency: string
items?: Array<{
itemId: string
itemName: string
price: number
quantity: number
}>
}) => {
trackEvent({
action: 'purchase',
transaction_id: params.transactionId,
value: params.value,
currency: params.currency,
items: params.items,
})
}
// Content events
export const trackSearch = (searchTerm: string) => {
trackEvent({
action: 'search',
search_term: searchTerm,
})
}
export const trackShare = (method: string, contentType: string, itemId: string) => {
trackEvent({
action: 'share',
method,
content_type: contentType,
item_id: itemId,
})
}
// Form events
export const trackFormStart = (formName: string) => {
trackEvent({
action: 'form_start',
form_name: formName,
})
}
export const trackFormSubmit = (formName: string, success: boolean) => {
trackEvent({
action: 'form_submit',
form_name: formName,
success,
})
}
// Error tracking
export const trackError = (errorMessage: string, errorLocation?: string) => {
trackEvent({
action: 'exception',
description: errorMessage,
fatal: false,
error_location: errorLocation,
})
}
// Custom event builder for flexibility
export const createCustomEvent = (eventName: string) => {
return (params?: Record<string, unknown>) => {
trackEvent({
action: eventName,
...params,
})
}
}Create a consent-aware wrapper:
// lib/analytics-consent.ts
type ConsentState = 'granted' | 'denied'
interface ConsentConfig {
analytics_storage: ConsentState
ad_storage: ConsentState
ad_user_data: ConsentState
ad_personalization: ConsentState
}
const CONSENT_COOKIE = 'analytics_consent'
// Initialize with consent mode
export const initWithConsent = (measurementId: string) => {
if (typeof window === 'undefined') return
// Set default consent state (denied until user consents)
window.gtag('consent', 'default', {
analytics_storage: 'denied',
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
wait_for_update: 500, // Wait for consent banner
})
// Load gtag
const script = document.createElement('script')
script.src = `https://www.googletagmanager.com/gtag/js?id=${measurementId}`
script.async = true
document.head.appendChild(script)
window.dataLayer = window.dataLayer || []
window.gtag = function gtag() {
window.dataLayer.push(arguments)
}
window.gtag('js', new Date())
window.gtag('config', measurementId)
// Check for existing consent
const savedConsent = getCookie(CONSENT_COOKIE)
if (savedConsent) {
updateConsent(JSON.parse(savedConsent))
}
}
// Update consent when user makes a choice
export const updateConsent = (consent: Partial<ConsentConfig>) => {
if (typeof window === 'undefined' || !window.gtag) return
const consentState: ConsentConfig = {
analytics_storage: consent.analytics_storage || 'denied',
ad_storage: consent.ad_storage || 'denied',
ad_user_data: consent.ad_user_data || 'denied',
ad_personalization: consent.ad_personalization || 'denied',
}
window.gtag('consent', 'update', consentState)
// Save to cookie
setCookie(CONSENT_COOKIE, JSON.stringify(consentState), 365)
}
// Convenience functions
export const acceptAll = () => {
updateConsent({
analytics_storage: 'granted',
ad_storage: 'granted',
ad_user_data: 'granted',
ad_personalization: 'granted',
})
}
export const acceptAnalyticsOnly = () => {
updateConsent({
analytics_storage: 'granted',
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
})
}
export const denyAll = () => {
updateConsent({
analytics_storage: 'denied',
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
})
}
// Cookie utilities
function setCookie(name: string, value: string, days: number) {
const date = new Date()
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000)
document.cookie = `${name}=${value};expires=${date.toUTCString()};path=/;SameSite=Lax`
}
function getCookie(name: string): string | null {
const match = document.cookie.match(new RegExp(`(^| )${name}=([^;]+)`))
return match ? match[2] : null
}Add debug configuration:
// For development, enable debug mode
if (process.env.NODE_ENV === 'development') {
window.gtag('config', 'G-XXXXXXXXXX', {
debug_mode: true,
})
}Also recommend installing the Google Analytics Debugger Chrome extension.
Create types/gtag.d.ts if using TypeScript:
// types/gtag.d.ts
declare global {
interface Window {
gtag: Gtag.Gtag
dataLayer: object[]
}
}
declare namespace Gtag {
interface Gtag {
(command: 'config', targetId: string, config?: ConfigParams): void
(command: 'set', targetId: string, config: ConfigParams): void
(command: 'set', config: ConfigParams): void
(command: 'js', date: Date): void
(command: 'event', eventName: string, eventParams?: EventParams): void
(command: 'consent', consentArg: 'default' | 'update', consentParams: ConsentParams): void
(...args: unknown[]): void
}
interface ConfigParams {
page_title?: string
page_location?: string
page_path?: string
send_page_view?: boolean
debug_mode?: boolean
[key: string]: unknown
}
interface EventParams {
event_category?: string
event_label?: string
value?: number
[key: string]: unknown
}
interface ConsentParams {
analytics_storage?: 'granted' | 'denied'
ad_storage?: 'granted' | 'denied'
ad_user_data?: 'granted' | 'denied'
ad_personalization?: 'granted' | 'denied'
wait_for_update?: number
}
}
export {}After implementation, verify:
After completing setup, provide the user with:
"gtag is not defined"
No data in GA4
Double page views
GDPR Compliance
© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in skills/add-analytics of LeoYeAI/openclaw-master-skills.
Open the folder on GitHubat commit e5199b5
Add Analytics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Add Analytics this skillLeoYeAI/openclaw-master-skills | 2.2k | — | ~4.6k | Automated safety check: Notes | MIT | |
| SEO GoogleAgriciDaniel/codex-seo | 791 | 2 repos | ~3.4k | Automated safety check: Pass | MIT | |
| Google Analyticsnowork-studio/notfair-plugin | 3.9k | — | ~813 | Automated safety check: Pass | MIT | |
| Google Analyticsrefly-ai/refly-skills | 204 | — | ~504 | Automated safety check: Pass | None | |
| Google Analytics Data API Basicsgoogle/skills | 21k | — | ~2.4k | Automated safety check: Pass | Apache-2.0 | |
| Implementing Real User Monitoringjeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~977 | Automated safety check: Pass | MIT |
AgriciDaniel/codex-seo
Google SEO APIs: Search Console (Search Analytics, URL Inspection, Sitemaps), PageSpeed Insights v5, CrUX field data with 25-week history, Indexing API v3, and GA4 organic traffic.
nowork-studio/notfair-plugin
Analyze connected Google Analytics 4 traffic, acquisition, engagement, landing pages, ecommerce, events, and conversions, and safely manage supported GA4 key events or custom dimensions through…
refly-ai/refly-skills
Integrate with Google Analytics for web metrics. An agent skill from refly-ai/refly-skills.
google/skills
Manages Google Analytics reporting data, enables the Analytics Data API via the Cloud CLI, and creates reports using the Google Analytics Data API (v1beta).
jeremylongshore/tons-of-skills-marketplace
Implement Real User Monitoring (RUM) to capture actual user performance data including Core Web Vitals and page load times.
akseolabs-seo/seo-coach
Beginner-first SEO coaching for people who want to learn by doing one safe, verifiable step at a time.
LeoYeAI/openclaw-master-skills
Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.
LeoYeAI/openclaw-master-skills
Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.
LeoYeAI/openclaw-master-skills
Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.
LeoYeAI/openclaw-master-skills
Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.
LeoYeAI/openclaw-master-skills
Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.
LeoYeAI/openclaw-master-skills
Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.
Works with
Categories
Add Google Analytics 4 tracking to any project. An agent skill from LeoYeAI/openclaw-master-skills. Add Analytics is an agent skill from LeoYeAI/openclaw-master-skills. Add Google Analytics 4 tracking to any project.
Add Analytics fits situations like: frontend & Design work in your project.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill add-analytics -a claude-code`. Or copy the skill folder (skills/add-analytics in LeoYeAI/openclaw-master-skills) into .claude/skills/add-analytics in your project. Claude Code loads it when a task matches its description.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill add-analytics -a codex`. Or copy the skill folder (skills/add-analytics in LeoYeAI/openclaw-master-skills) into .agents/skills/add-analytics in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill add-analytics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-analytics, .gemini/skills/add-analytics, .github/skills/add-analytics and .opencode/skills/add-analytics in your project.
SKILL.md names no scripts, command-line tools or credentials: Add Analytics is instructions for the agent only.
SKILL.md names 3 domains. In commands or code: googletagmanager.com and support.google.com; the agent is likely to contact these when it follows the instructions. As links in the text: chrome.google.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Add Analytics is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.6k tokens (SKILL.md is roughly 18k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Add Analytics: SEO Google (AgriciDaniel/codex-seo, 791 stars), Google Analytics (nowork-studio/notfair-plugin, 3.9k stars), Google Analytics (refly-ai/refly-skills, 204 stars) and Google Analytics Data API Basics (google/skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,159 GitHub stars. The repository holds 972 skills in this directory. The repository was last updated on July 20, 2026.
Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.