Generates UTM-tagged URLs for campaign tracking. Use for creating tracking links, bulk UTM generation, or setting up campaign URL conventions.
79%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/utm-builder/SKILL.mdGenerate properly formatted UTM-tagged URLs for campaign tracking across all marketing channels.
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))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")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| Platform | utm_source |
|---|---|
| Google Ads | google |
| Meta Ads | facebook or instagram |
| LinkedIn Ads | linkedin |
| X Ads | twitter or x |
| Reddit Ads | reddit |
| TikTok Ads | tiktok |
email or specific ESP name | |
| Organic Social | organic_[platform] |
| Type | utm_medium |
|---|---|
| Paid Search | cpc |
| Paid Social | paid_social |
| Display | display |
email | |
| Organic | organic |
| Referral | referral |
| Affiliate | affiliate |
Use consistent format: {product}_{type}_{date}_{variant}
Examples:
product_launch_q1blackfriday_promo_2025_v2webinar_registration_q1UTM parameters flow into GA4 as:
utm_source → Traffic Sourceutm_medium → Mediumutm_campaign → Campaignutm_content → Manual Ad Contentutm_term → Manual TermPart 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.
Synter-Media-AI/free-skills
3df48f1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.