# Campaign Link Builder

> Build campaign links with UTM tags.

Campaign Link Builder is a client-side marketing utility in MyBox for building clean, consistent campaign URLs with standard UTM parameters. It supports real-time single link tagging, channel presets, bulk link generation, and RFC 4180 CSV export.

## UTM Parameters

- `utm_source` (required): Identifies which site or platform sent the traffic (e.g. `google`, `newsletter`, `linkedin`, `instagram`).
- `utm_medium` (required): Identifies what type of link was used (e.g. `cpc`, `email`, `social`, `referral`, `organic`).
- `utm_campaign` (required): Identifies a specific product promotion, seasonal offer, or strategic campaign (e.g. `summer_sale`, `launch_2026`).
- `utm_id` (optional): Used to identify which ad campaign or creative ID the click relates to.
- `utm_term` (optional): Identifies search keywords or targeting terms in paid search campaigns.
- `utm_content` (optional): Differentiates similar content or links within the same ad or email (e.g. `hero_button`, `footer_link`, `banner_a`).

## Lowercase Guidance

Analytics platforms such as Google Analytics 4 (GA4) treat parameter casing strictly. If one team member tags `utm_source=Google` and another tags `utm_source=google`, analytics reporting splits the traffic across two distinct sources. Always use lowercase letters, numbers, hyphens, and underscores for campaign values.

## Common Mistakes Avoided

- **Spaces in tag values**: Spaces cannot be reliably encoded across ad platforms and email clients. The builder validates and rejects values containing spaces.
- **Duplicate UTM tags**: If a destination URL already contains existing UTM parameters (e.g. `?utm_source=old`), the builder replaces them instead of creating messy duplicates like `?utm_source=old&utm_source=new`.
- **Losing query parameters and fragments**: Existing parameters like `?ref=123` and hash fragments like `#pricing` are safely preserved in their correct position.
- **Inconsistent tag ordering**: Tags are always appended in standard fixed order: `source`, `medium`, `campaign`, `id`, `term`, `content`.

## Worked Example

Given destination URL `https://mybox.id/apps?ref=web#explore` and parameters:
- Source: `newsletter`
- Medium: `email`
- Campaign: `spring-2026`
- Content: `primary-cta`

Result URL:
`https://mybox.id/apps?ref=web&utm_source=newsletter&utm_medium=email&utm_campaign=spring-2026&utm_content=primary-cta#explore`

## Notes

- This Markdown twin is static. Open the interactive page to build and copy campaign links or export in bulk.

## Related

- [Campaign Link Builder](https://mybox.id/utm-builder)
- [Developer Tools](https://mybox.id/dev-tools): Everyday developer utilities.
- [Apps](https://mybox.id/apps): Every app with a short description.
