/geo-seo-skills:ga4-chatgpt-ai-trafficfrom geo-seo-skills
Configures GA4 to accurately track organic referral traffic from ChatGPT, Perplexity, Claude, Gemini, and Copilot using custom Channel Groups, Explorations, and BigQuery SQL.
Ships in geo-seo-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
By default, GA4 dumps ChatGPT, Perplexity, and Claude clicks into generic Referral (or Direct when links strip referrers), hiding your highest-intent buyers. Use this skill to isolate and benchmark AI organic traffic cleanly.
Use this regex for Session source. GA4's matches regex must match the whole value, so the pattern is anchored: it accepts subdomains (chat.deepseek.com) and rejects look-alike domains (notchatgpt.com). Referrer domains arrive in lowercase, but GA4 keeps the case of utm_source / utm_medium, so keep your own UTM tags lowercase (or add the capitalised variants).
^(.*\.)?(chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|edgeservices\.bing\.com|you\.com|phind\.com|meta\.ai|deepseek\.com|grok\.com)$
Test it against your own source list before saving: every AI row should match and nothing else.
Note: ChatGPT automatically appends ?utm_source=chatgpt.com on many outbound citation links—matching Session source captures both UTM-tagged clicks and referrer-only clicks.
AI Search with two AND conditions:
Source matches regex (use the regex above)Medium does not match regex .*(cpc|ppc|paid|display|cpm|affiliate|sponsored).* (the .* on both sides is needed because GA4 matches the whole value)AI Search to the top of the channel order list (above Organic Search and Referral); GA4 assigns each session to the first channel that matches, so otherwise Referral claims these sessions and your new channel stays at zero.Create a GA4 Free-form Exploration comparing your custom channel group's dimension (GA4 names it after the group, e.g. Session <your group name>) = AI Search vs Organic Search:
Landing page + query string, Session sourceSessions, Engaged sessions, Engagement rate, Key events, Session key event rateUse the session's own source. traffic_source.* in the export is the user's first acquisition source, not this session's. session_traffic_source_last_click.cross_channel_campaign (in exports since mid-2024) mirrors GA4's session source/medium. The regex and the paid exclusion are the same as in Steps 1–2, so the numbers match the UI channel.
SELECT
CASE
WHEN REGEXP_CONTAINS(LOWER(IFNULL(session_traffic_source_last_click.cross_channel_campaign.source, '')),
r'^(.*\.)?(chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|edgeservices\.bing\.com|you\.com|phind\.com|meta\.ai|deepseek\.com|grok\.com)$')
AND NOT REGEXP_CONTAINS(LOWER(IFNULL(session_traffic_source_last_click.cross_channel_campaign.medium, '')),
r'(cpc|ppc|paid|display|cpm|affiliate|sponsored)')
THEN 'AI Search'
ELSE 'Other'
END AS ai_channel,
session_traffic_source_last_click.cross_channel_campaign.source AS session_source,
COUNT(DISTINCT CONCAT(user_pseudo_id, '-',
CAST((SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS STRING))) AS sessions
FROM `your_project.analytics_XXXX.events_*`
-- the last 28 complete days (today's table is still filling)
WHERE _TABLE_SUFFIX BETWEEN FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 28 DAY))
AND FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY))
GROUP BY 1, 2
ORDER BY sessions DESC;
Always remind stakeholders that direct AI clicks undercount true AI impact (many users copy your brand name from ChatGPT into Google). Pair this report with GSC brandedClassification (gsc-genai-branded-halo) for the full attribution picture.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ga4, ai-traffic, referral-tracking, organic-traffic, analytics
npx claudepluginhub zhuyansen/geo-seo-skills --plugin geo-seo-skills11 skills in this plugin
/aeo-answer-indexBuild a reproducible monthly AI Answer Index across ChatGPT, Perplexity, Gemini, and Claude. Produces prompt panels, normalized scoring scripts, CSV exports, and Schema.org Dataset landing pages that earn natural backlinks and B2B leads./geo-entity-gap-auditAudit a brand or founder's Knowledge Graph footprint, Schema.org @id graph, disambiguation risks, and off-site co-citation gaps. Outputs a prioritized entity-home repair checklist and clean JSON-LD patch./gsc-genai-branded-haloMeasure AI search attribution without vanity metrics by combining Google Search Console native brandedClassification, the Search Console Generative AI performance report, and GA4 AI referral channel groups./llms-txt-validatorGenerate and validate a spec-compliant /llms.txt index, /llms-full.txt archive, RFC 8288 discovery headers, and clean Markdown (.md) twins for LLM retrieval and coding agents./reddit-ai-visibility-playbookExecute a rule-respecting, non-spammy Reddit co-citation strategy to increase brand mentions in ChatGPT, Perplexity, and Google AI Overviews using verifiable buyer evidence and high-ranking thread discovery./robots-ai-crawler-auditAudit robots.txt and edge WAF behavior across all major AI search and training user-agents. Separates live search citation bots from training scrapers and verifies real HTTP 200 zero-JS responses.Other plugins' skills for the same job