/utm-builder
UTM Parameter Strategy & Builder — naming conventions, GA4 channel grouping rules, auto-tagging, common mistakes, and BigQuery validation queries
$ npx -y skills add cognyai/claude-code-marketing-skills --skill utm-builder --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/utm-builder
Context preview
The summary Claude sees to decide when to auto-load this skill.
UTM Parameter Strategy & Builder — naming conventions, GA4 channel grouping rules, auto-tagging, common mistakes, and BigQuery validation queries
SKILL.md
utm-builder.SKILL.mdname: utm-builder
description: UTM Parameter Strategy & Builder — naming conventions, GA4 channel grouping rules, auto-tagging, common mistakes, and BigQuery validation queries
version: "1.0.0"
author: Cogny AI
platforms: []
user-invocable: true
argument-hint: "<query or topic>"
allowed-tools:
- WebSearch
- Read
- Write
- Bash
# GA4 tools (when connected via Cogny MCP)
- mcp__cogny__google_analytics_4__tool_run_report
- mcp__cogny__google_analytics_4__tool_get_property
- mcp__cogny__google_analytics_4__tool_list_data_streams
# Google Ads tools
- mcp__cogny__google_ads__tool_execute_gaql
UTM Parameter Strategy & Builder Reference
Complete guide to UTM parameter strategy, naming conventions, GA4 default channel grouping rules, auto-tagging behavior, common mistakes, and BigQuery validation queries for marketing attribution.
Full docs: https://cogny.com/docs/utm-strategy
Usage
/utm-builder # Full UTM strategy overview
/utm-builder naming conventions # Show naming convention rules
/utm-builder channel grouping # GA4 default channel grouping rules
/utm-builder meta ads # Meta Ads UTM template
/utm-builder audit # BigQuery validation queries
/utm-builder build google cpc # Generate UTM URL for Google Ads
Instructions
You are a UTM strategy and marketing attribution expert. Use this reference to help users build correct UTM URLs, audit existing UTM naming conventions, understand GA4 default channel grouping rules, and validate attribution data in BigQuery.
When the user asks a question, find the relevant section below and provide precise, actionable answers. When building UTM URLs, always enforce lowercase and hyphen-separated naming conventions.
If the user provides a specific topic as an argument, focus on that area. Otherwise, provide an overview of UTM strategy fundamentals.
When connected to Cogny MCP tools, you can pull live GA4 data and Google Ads data to audit real UTM implementations.
---
The Five UTM Parameters
| Parameter | Required | Purpose | Example | |-----------|----------|---------|---------| | `utm_source` | Yes | Platform or publisher sending traffic | `google`, `facebook`, `linkedin`, `newsletter` | | `utm_medium` | Yes | Marketing channel type | `cpc`, `paid-social`, `email`, `organic-social` | | `utm_campaign` | Yes | Specific campaign name | `spring-sale-2025`, `brand-awareness-q1` | | `utm_term` | No | Paid search keywords | `running+shoes`, `crm+software` | | `utm_content` | No | Creative variant or link placement | `hero-banner`, `sidebar-cta`, `blue-variant` |
Parameter Details
**utm_source** — Where did the click physically happen?
utm_source=google # Google Ads or Google organic
utm_source=facebook # Meta Ads (Facebook/Instagram)
utm_source=linkedin # LinkedIn Ads or organic
utm_source=klaviyo # Email via Klaviyo
utm_source=tiktok # TikTok Ads
utm_source=partner-blog # A specific referral partner
**utm_medium** — The channel type. This is the most important parameter for GA4 default channel grouping. If utm_medium is wrong, traffic lands in the wrong channel.
utm_medium=cpc # Cost-per-click (paid search)
utm_medium=paid-social # Paid social ads
utm_medium=email # Email marketing
utm_medium=organic-social # Organic social posts
utm_medium=display # Display/banner ads
utm_medium=affiliate # Affiliate traffic
utm_medium=referral # Partner/referral traffic
utm_medium=video # Video ads
**utm_campaign** — Campaign name with consistent structure:
utm_campaign=spring-sale-2025
utm_campaign=brand-awareness-q1-2025
utm_campaign=retargeting-cart-abandoners
**utm_term** — Keyword or targeting term:
utm_term=running-shoes
utm_term=best-crm-software
**utm_content** — Creative variant or placement:
utm_content=hero-image-v1
utm_content=sidebar-cta
utm_content=video-30s
GA4 Default Channel Grouping Rules
GA4 classifies every session into a default channel group based on `source`, `medium`, and `campaign` values. These rules determine how traffic appears in GA4 standard reports.
| Channel | Medium Must Match | |---------|-------------------| | **Direct** | source = `(direct)` AND medium is `(not set)` or `(none)` | | **Organic Search** | medium = `organic` | | **Paid Search** | medium matches `^(cpc\|ppc\|paidsearch)$` | | **Display** | medium matches `^(display\|cpm\|banner)$` | | **Paid Social** | medium matches `^(paid-social\|paidsocial\|paid_social)$` | | **Organic Social** | medium matches `^(social\|social-network\|social-media\|sm\|organic-social)$` | | **Email** | medium = `email` | | **Affiliates** | medium = `affiliate` | | **Referral** | medium = `referral` | | **Audio** | medium = `audio` | | **SMS** | medium matches `^(sms\|sms_message)$` | | **Video** | medium matches `^(video\|youtube)$` | | **Cross-network** | campaign name contains `cross-network` | | **Unassigned** | Does not match any rule above |
**Critical:** If `utm_medium` does not match any pattern above, traffic falls into **Unassigned**.
GA4 Source/Medium Mapping in BigQuery
UTM values appear in multiple locations in the GA4 BigQuery export:
| UTM Parameter | BigQuery Location | Scope | |---------------|-------------------|-------| | `utm_source` | `traffic_source.source` | User (first-touch) | | `utm_medium` | `traffic_source.medium` | User (first-touch) | | `utm_campaign` | `traffic_source.name` | User (first-touch) | | `utm_source` | Event param `source` on `session_start` | Session | | `utm_medium` | Event param `medium` on `session_start` | Session | | `utm_campaign` | Event param `campaign` on `session_start` | Session |
**Session-level source/medium query:**
SELECT
(SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'source') as session_source,
(SELECT value.string_value FRO
Read more
name: utm-builder description: UTM Parameter Strategy & Builder — naming conventions, GA4 channel grouping rules, auto-tagging, common mistakes, and BigQuery validation queries version: "1.0.0" author: Cogny AI platforms: [] user-invocable: true argument-hint: "<query or topic>" allowed-tools: - WebSearch - Read - Write - Bash # GA4 tools (when connected via Cogny MCP) - mcp__cogny__google_analytics_4__tool_run_report - mcp__cogny__google_analytics_4__tool_get_property - mcp__cogny__google_analytics_4__tool_list_data_streams # Google Ads tools - mcp__cogny__google_ads__tool_execute_gaql
UTM Parameter Strategy & Builder Reference
Complete guide to UTM parameter strategy, naming conventions, GA4 default channel grouping rules, auto-tagging behavior, common mistakes, and BigQuery validation queries for marketing attribution.
Full docs: https://cogny.com/docs/utm-strategy
Usage
/utm-builder # Full UTM strategy overview /utm-builder naming conventions # Show naming convention rules /utm-builder channel grouping # GA4 default channel grouping rules /utm-builder meta ads # Meta Ads UTM template /utm-builder audit # BigQuery validation queries /utm-builder build google cpc # Generate UTM URL for Google Ads
Instructions
You are a UTM strategy and marketing attribution expert. Use this reference to help users build correct UTM URLs, audit existing UTM naming conventions, understand GA4 default channel grouping rules, and validate attribution data in BigQuery.
When the user asks a question, find the relevant section below and provide precise, actionable answers. When building UTM URLs, always enforce lowercase and hyphen-separated naming conventions.
If the user provides a specific topic as an argument, focus on that area. Otherwise, provide an overview of UTM strategy fundamentals.
When connected to Cogny MCP tools, you can pull live GA4 data and Google Ads data to audit real UTM implementations.
---
The Five UTM Parameters
| Parameter | Required | Purpose | Example | |-----------|----------|---------|---------| | `utm_source` | Yes | Platform or publisher sending traffic | `google`, `facebook`, `linkedin`, `newsletter` | | `utm_medium` | Yes | Marketing channel type | `cpc`, `paid-social`, `email`, `organic-social` | | `utm_campaign` | Yes | Specific campaign name | `spring-sale-2025`, `brand-awareness-q1` | | `utm_term` | No | Paid search keywords | `running+shoes`, `crm+software` | | `utm_content` | No | Creative variant or link placement | `hero-banner`, `sidebar-cta`, `blue-variant` |
Parameter Details
**utm_source** — Where did the click physically happen?
utm_source=google # Google Ads or Google organic utm_source=facebook # Meta Ads (Facebook/Instagram) utm_source=linkedin # LinkedIn Ads or organic utm_source=klaviyo # Email via Klaviyo utm_source=tiktok # TikTok Ads utm_source=partner-blog # A specific referral partner
**utm_medium** — The channel type. This is the most important parameter for GA4 default channel grouping. If utm_medium is wrong, traffic lands in the wrong channel.
utm_medium=cpc # Cost-per-click (paid search) utm_medium=paid-social # Paid social ads utm_medium=email # Email marketing utm_medium=organic-social # Organic social posts utm_medium=display # Display/banner ads utm_medium=affiliate # Affiliate traffic utm_medium=referral # Partner/referral traffic utm_medium=video # Video ads
**utm_campaign** — Campaign name with consistent structure:
utm_campaign=spring-sale-2025 utm_campaign=brand-awareness-q1-2025 utm_campaign=retargeting-cart-abandoners
**utm_term** — Keyword or targeting term:
utm_term=running-shoes utm_term=best-crm-software
**utm_content** — Creative variant or placement:
utm_content=hero-image-v1 utm_content=sidebar-cta utm_content=video-30s
GA4 Default Channel Grouping Rules
GA4 classifies every session into a default channel group based on `source`, `medium`, and `campaign` values. These rules determine how traffic appears in GA4 standard reports.
| Channel | Medium Must Match | |---------|-------------------| | **Direct** | source = `(direct)` AND medium is `(not set)` or `(none)` | | **Organic Search** | medium = `organic` | | **Paid Search** | medium matches `^(cpc\|ppc\|paidsearch)$` | | **Display** | medium matches `^(display\|cpm\|banner)$` | | **Paid Social** | medium matches `^(paid-social\|paidsocial\|paid_social)$` | | **Organic Social** | medium matches `^(social\|social-network\|social-media\|sm\|organic-social)$` | | **Email** | medium = `email` | | **Affiliates** | medium = `affiliate` | | **Referral** | medium = `referral` | | **Audio** | medium = `audio` | | **SMS** | medium matches `^(sms\|sms_message)$` | | **Video** | medium matches `^(video\|youtube)$` | | **Cross-network** | campaign name contains `cross-network` | | **Unassigned** | Does not match any rule above |
**Critical:** If `utm_medium` does not match any pattern above, traffic falls into **Unassigned**.
GA4 Source/Medium Mapping in BigQuery
UTM values appear in multiple locations in the GA4 BigQuery export:
| UTM Parameter | BigQuery Location | Scope | |---------------|-------------------|-------| | `utm_source` | `traffic_source.source` | User (first-touch) | | `utm_medium` | `traffic_source.medium` | User (first-touch) | | `utm_campaign` | `traffic_source.name` | User (first-touch) | | `utm_source` | Event param `source` on `session_start` | Session | | `utm_medium` | Event param `medium` on `session_start` | Session | | `utm_campaign` | Event param `campaign` on `session_start` | Session |
**Session-level source/medium query:**
SELECT (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'source') as session_source, (SELECT value.string_value FRO
AI marketing skills for Claude Code, Cursor, Windsurf, and other AI coding tools. Audit SEO, analyze ads, research competitors, qualify leads — all from your terminal. Free skills need no account. Premium skills connect your real data for $9/mo.
Repo: cognyai/claude-code-marketing-skills
Other skills on claude-code-marketing-skills.
brand-kit
Build a portable brand-kit.json for the user's product — colors, typography, voice — that other skills (video, ad creative, landing page) can consume. Multiple…
cogny
Run Cogny marketing analysis tasks — fetch scheduled tasks, analyze ad accounts via MCP, report findings
community-pulse
Weekly read on Discord community health — joins, active channels, top contributors, themes, and unanswered questions
conversion-debug
Conversion Tracking Debugger — diagnose discrepancies across GTM, GA4, Google Ads & Meta Pixel with live API access, BigQuery validation queries, and…

