agentleFS
Synter-Media-AISynter-Media-AI/free-skills/skills/utm-builder/SKILL.md

utm-builder

Skill4 starsChanged 6 months agoMITView on GitHub

Generates UTM-tagged URLs for campaign tracking. Use for creating tracking links, bulk UTM generation, or setting up campaign URL conventions.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Single URL Generation: - Create one UTM-tagged URL with all parameters

    line 12
  2. Distinctive:

    UTM Validation: - Check existing URLs for proper UTM formatting

    line 14
  3. Distinctive:

    When a user asks to create a tracking URL:

    line 21
  4. Distinctive:

    When user asks: "Create a UTM link for our Google Ads campaign to yoursite.com/signup"

    line 51
  5. Very specific:

    Use consistent format: {product}_{type}_{date}_{variant}

    line 115
  6. Distinctive:

    Be consistent: - Use the same source/medium values across campaigns

    line 141
  7. Distinctive:

    No spaces: - Use underscores or hyphens

    line 143
  8. Distinctive:

    Document conventions: - Create a UTM naming guide for your team

    line 144
  9. Distinctive:

    Shorten URLs: - Use URL shorteners for social/email if needed

    line 145
  10. Distinctive:

    Test tracking: - Verify URLs work before launching

    line 146

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

UTM Builder Skill

Generate properly formatted UTM-tagged URLs for campaign tracking across all marketing channels.

Capabilities

  1. Single URL Generation - Create one UTM-tagged URL with all parameters
  2. Bulk URL Generation - Generate multiple URLs for multi-channel campaigns
  3. UTM Validation - Check existing URLs for proper UTM formatting
  4. Convention Templates - Apply consistent naming conventions across campaigns

Quick Usage

Generate Single UTM URL

When a user asks to create a tracking URL:

def build_utm_url(
    base_url: str,
    source: str,      # google, facebook, linkedin, newsletter
    medium: str,      # cpc, paid_social, email, organic
    campaign: str,    # campaign name/promo code
    content: str = None,  # ad variation identifier
    term: str = None      # paid search keywords
) -> str:
    from urllib.parse import urlencode, urlparse, urlunparse, parse_qs
    
    parsed = urlparse(base_url if base_url.startswith('http') else f'https://{base_url}')
    params = parse_qs(parsed.query)
    
    params['utm_source'] = [source]
    params['utm_medium'] = [medium]
    params['utm_campaign'] = [campaign]
    if content:
        params['utm_content'] = [content]
    if term:
        params['utm_term'] = [term]
    
    query = urlencode({k: v[0] for k, v in params.items()})
    return urlunparse(parsed._replace(query=query))

Example Response

When user asks: "Create a UTM link for our Google Ads campaign to yoursite.com/signup"

Here's your UTM-tagged URL:

https://yoursite.com/signup?utm_source=google&utm_medium=cpc&utm_campaign=product_launch_q1

**Parameters:**
- Source: google (where traffic comes from)
- Medium: cpc (paid search)
- Campaign: product_launch_q1 (campaign identifier)

You can add optional parameters:
- `utm_content`: To differentiate ad variations (e.g., "headline_a")
- `utm_term`: For paid search keywords (e.g., "ppc+management")

Bulk Generation

For multi-channel campaigns, generate all URLs at once:

CHANNELS = [
    {"source": "google", "medium": "cpc", "content": "search"},
    {"source": "google", "medium": "display", "content": "banner"},
    {"source": "facebook", "medium": "paid_social", "content": "feed"},
    {"source": "linkedin", "medium": "paid_social", "content": "sponsored"},
    {"source": "email", "medium": "email", "content": "newsletter"},
]

def generate_campaign_urls(base_url: str, campaign: str) -> list[dict]:
    urls = []
    for ch in CHANNELS:
        url = build_utm_url(base_url, ch["source"], ch["medium"], campaign, ch["content"])
        urls.append({"channel": f"{ch['source']}_{ch['medium']}", "url": url})
    return urls

Naming Conventions

Source Values

Platformutm_source
Google Adsgoogle
Meta Adsfacebook or instagram
LinkedIn Adslinkedin
X Adstwitter or x
Reddit Adsreddit
TikTok Adstiktok
Emailemail or specific ESP name
Organic Socialorganic_[platform]

Medium Values

Typeutm_medium
Paid Searchcpc
Paid Socialpaid_social
Displaydisplay
Emailemail
Organicorganic
Referralreferral
Affiliateaffiliate

Campaign Naming

Use consistent format: {product}_{type}_{date}_{variant}

Examples:

  • product_launch_q1
  • blackfriday_promo_2025_v2
  • webinar_registration_q1

Validation Rules

  • Source: Required, lowercase, no spaces
  • Medium: Required, lowercase, use standard values
  • Campaign: Required, lowercase, underscores for spaces
  • Content: Optional, use for A/B testing
  • Term: Optional, URL-encode keywords

Integration with Google Analytics

UTM parameters flow into GA4 as:

  • utm_source → Traffic Source
  • utm_medium → Medium
  • utm_campaign → Campaign
  • utm_content → Manual Ad Content
  • utm_term → Manual Term

Best Practices

  1. Be consistent - Use the same source/medium values across campaigns
  2. Use lowercase - GA is case-sensitive; "Google" ≠ "google"
  3. No spaces - Use underscores or hyphens
  4. Document conventions - Create a UTM naming guide for your team
  5. Shorten URLs - Use URL shorteners for social/email if needed
  6. Test tracking - Verify URLs work before launching

About this skill

Part of the Synter free skills collection — open-source agent skills for advertising, PPC, and marketing automation.

Want this skill (and 40+ more) running on autopilot against your live ad accounts? Try Synter — AI Agent Media Buyers that connect to Google, Meta, LinkedIn, TikTok, Reddit, Amazon, and 7+ more platforms.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.