Skip to content
Documentation menu: UTM tracking

UTM campaign tracking

Track your marketing campaigns with UTM parameters and see exactly which channels drive the most valuable traffic and conversions.

Setup time

No setup needed

Difficulty

Easy

Value

Sales traced to each source

What are UTM parameters?

Understanding the building blocks of campaign tracking

UTM parameters are special tags you add to your URLs to track the effectiveness of your marketing campaigns. When someone clicks a link with UTM parameters, theBizness.ai automatically captures and attributes their actions to the specific campaign.

Campaign data is used for attribution for up to 30 days. After that the script ignores it, and it stays in the browser until it is replaced or cleared. Safari (macOS and iOS) and Brave cap cookies written by JavaScript at about 7 days, and Safari also clears localStorage after 7 days without a visit. Visitors who return later in those browsers can show as new visitors, and the proxy setup does not lift this.

A sale is credited to the source the visitor most recently arrived with in the 30 days before the sale. A visit that has no source of its own (reported as direct) never replaces a real source, including when the visitor is shared across subdomains with data-cookie-domain. See the revenue attribution guide for the details.

utm_source

Where the traffic comes from (google, facebook, newsletter)

utm_medium

The marketing medium (email, social, cpc, banner)

utm_campaign

The specific campaign name (summer_sale, product_launch)

utm_term

Keywords for paid search (optional)

utm_content

Specific content or ad variation (optional)

Automatic

No code needed. The script captures them on its own.

Campaign examples

Email newsletter campaign

Track email campaign performance and subscriber engagement
Source

newsletter

Medium

email

Campaign

summer_sale

Term

discount

Content

header_cta

Full URL:

https://yourdomain.com?utm_source=newsletter&utm_medium=email&utm_campaign=summer_sale&utm_term=discount&utm_content=header_cta

Use cases

  • • Track which email campaigns drive the most conversions
  • • Compare performance of different CTAs (header vs footer)
  • • Measure revenue attributed to email marketing

Social media campaign

Track social media posts and ad performance across platforms
Source

facebook

Medium

social

Campaign

product_launch

Term

-

Content

video_ad

Full URL:

https://yourdomain.com?utm_source=facebook&utm_medium=social&utm_campaign=product_launch&utm_content=video_ad

Use cases

  • • Compare performance across different social platforms
  • • Track which content types drive engagement
  • • Compare the sales each social platform brings in

Paid search campaign

Track Google Ads and other paid search performance
Source

google

Medium

cpc

Campaign

brand_keywords

Term

business_analytics

Content

ad_group_1

Full URL:

https://yourdomain.com?utm_source=google&utm_medium=cpc&utm_campaign=brand_keywords&utm_term=business_analytics&utm_content=ad_group_1

Use cases

  • • Track keyword-level performance and conversions
  • • Compare different ad groups and campaigns
  • • Optimize ad spend based on actual revenue data

Naming conventions and best practices

Follow these guidelines for consistent and effective campaign tracking

Email Campaigns:
✅ utm_source=newsletter
✅ utm_medium=email
✅ utm_campaign=summer_sale_2024
✅ utm_content=header_cta

Social Media:
✅ utm_source=facebook
✅ utm_medium=social
✅ utm_campaign=product_launch
✅ utm_content=video_ad_1

Paid Search:
✅ utm_source=google
✅ utm_medium=cpc
✅ utm_campaign=brand_keywords
✅ utm_term=business_analytics
✅ utm_content=ad_group_1

Content Marketing:
✅ utm_source=blog
✅ utm_medium=content
✅ utm_campaign=thought_leadership
✅ utm_content=analytics_guide

❌ Avoid:
- Inconsistent casing (Facebook vs facebook)
- Spaces (use underscores or hyphens)
- Special characters
- Too generic terms (campaign1, test)

Best practices

  • • Use lowercase consistently (pageview UTM values are stored in lowercase)
  • • Replace spaces with underscores
  • • Keep names descriptive but concise
  • • Use consistent naming across teams
  • • Include dates for time-based campaigns

Common mistakes

  • • Inconsistent capitalization
  • • Using spaces instead of underscores
  • • Generic names like "campaign1"
  • • Forgetting to URL encode special characters
  • • Not documenting naming conventions

Technical implementation

UTM tracking works automatically, but here's how to enhance it with custom events
Automatic tracking

UTM parameters are automatically captured and associated with all page views and events. No additional code required.

Optional: custom event tracking

While UTM tracking is automatic, you can enhance it with custom events:

1. Add to the page head (HTML)

<!-- Custom event tracking. Put this inline script in the page <head>, before any calls. Calls made
     before the deferred tracking script loads are queued and replayed once it loads. -->
<script>window.thebizness=window.thebizness||function(){(window.thebizness.q=window.thebizness.q||[]).push(arguments)}</script>

2. Call the events from your JavaScript

// Basic UTM tracking (automatic with the theBizness script)
// No additional code needed: UTM parameters are captured and attached to every event

// Custom event calls (JavaScript). They run after the head stub above is in place.
function trackPurchase(orderId, amount) {
  window.thebizness('purchase', {
    orderId: orderId,
    amount: amount, // in currency units, e.g. 99.99
    currency: 'USD'
  });
}

// Non-revenue events use the same call
function trackSignup() {
  window.thebizness('signup', {});
}

// Example usage
trackPurchase('order_123456', 99.99);
trackSignup();

Custom events count toward your plan's tracked events (pageviews never do). A purchase event that includes an amount is recorded as a custom event and as a sale, so it counts as two tracked events. An event without an amount counts as one. A purchase sent from the browser is client-reported, unverified revenue: see the revenue attribution guide for verified options and the API reference for the limits.

Viewing UTM data in the dashboard

How to analyze your campaign performance in theBizness.ai

Campaign overview

See all campaigns with traffic, conversions, and revenue data

Source and medium

Compare performance across different traffic sources

Revenue attribution

See which campaigns generate the most revenue

Available reports

  • • Campaign performance with conversion rates
  • • Source/medium breakdown with revenue data
  • • Customer journey from first visit to purchase
  • • Results for any date range, with days and times in your website's time zone (set under Configure, Website details)

Start tracking your campaigns

Ready to see which marketing channels drive your best customers? Create your first UTM campaign and start seeing which sources bring in sales.

UTM builder

Generate properly formatted UTM links

UTM dashboard

See campaign performance for any date range

Revenue reports

Track which campaigns generate revenue