Configuration

Configure Channel Rules

Channels are how SourceTag categorises each visitor into a marketing source: Paid Search, Organic Social, Email, Direct, and so on. When someone lands on your site, SourceTag evaluates the visitor’s UTM parameters, click IDs, and referrer against your channel rules, top to bottom. The first rule that matches wins.

You can use the defaults as-is, or customise them to match the way your business thinks about traffic.

The default channels

When you add a site, SourceTag creates 11 channel rules based on GA4’s standard channel groupings. They are evaluated in this order:

PriorityChannelMatches when
1Emailutm_medium is email, e-mail, email-marketing, newsletter, or broadcast
2Affiliatesutm_medium is affiliate, affiliates, or partner
3Paid Socialutm_medium is a paid type (cpc, ppc, paid, paidsocial, etc.) AND utm_source is a social platform
4Paid Searchutm_medium is cpc, ppc, paid, paidsearch, search-ads, adwords, etc. OR has gclid/msclkid click ID
5Displayutm_medium is display, banner, cpm, interstitial, expandable, or rich-media
6Paid Videoutm_medium is video, paid-video, pre-roll, preroll, or instream
7Other CampaignsHas UTM parameters but did not match any channel above
8Organic SocialReferrer is a recognised social network (70+ domains) OR utm_medium is social/organic-social
9Organic SearchReferrer is a recognised search engine (80+ domains including AI search)
10ReferralHas an external referrer that did not match any channel above
11DirectNo referrer and no UTM parameters

These defaults work well for most sites. You only need to change them if your business has specific requirements.

Where to find channel rules

  1. Log in to your SourceTag dashboard at app.sourcetag.io
  2. Select your site
  3. Go to the Channel Rules page

You will see a list of all active channel rules in priority order.

How channel matching works

Each channel rule has one or more conditions. There are two types:

Detection conditions check utm_medium values, click IDs, or referrer domains. If ANY one of these matches, the channel is a candidate. These use OR logic.

Filter conditions check utm_source or utm_campaign. If specified, these must ALSO match on top of the detection condition. These use AND logic.

For example, Paid Social detects on utm_medium = cpc (among other paid mediums) but also filters on utm_source being a social platform. So a visit with utm_medium=cpc&utm_source=google does NOT match Paid Social (fails the source filter), but utm_medium=cpc&utm_source=facebook does.

Priority order matters

Rules are evaluated top to bottom. The first match wins, and evaluation stops. More specific channels should sit higher in the list than broader ones.

This is why Paid Social (priority 3) is above Paid Search (priority 4) by default. Both detect on cpc as a medium, but Paid Social adds the extra filter that the source must be a social platform. If Paid Search were evaluated first, Facebook CPC traffic would be incorrectly classified as Paid Search.

Email (priority 1) and Affiliates (priority 2) sit at the top because they have distinctive utm_medium values with no ambiguity. Other Campaigns (priority 7) sits above the organic channels to catch UTM-tagged traffic that didn’t match a specific paid channel.

Fallback channels

The last four channels (Organic Social, Organic Search, Referral, Direct) are primarily referrer-based or catch-all:

  • Organic Social catches visits from recognised social network domains, or with utm_medium of social/organic-social/organic_social
  • Organic Search catches visits from recognised search engine domains (including AI search engines)
  • Referral catches visits with an external referrer that did not match any rule above
  • Direct catches visits with no referrer and no UTMs

Other Campaigns (priority 7) sits above the organic channels. It catches UTM-tagged visits that didn’t match a specific paid channel, preventing them from falling through to Organic Social or Organic Search based on their referrer.

These fallback channels should generally stay at the bottom of the list, with Other Campaigns above the organic channels.

Reordering channels

To change the priority of a channel:

  1. On the Channel Rules page, drag the channel to its new position
  2. Click Save (or the order saves automatically, depending on your version)
  3. Click Rebuild Script to apply the changes to your live tracking script

The new order takes effect once the script is rebuilt and the CDN cache refreshes (usually within a few minutes).

Disabling a channel

If you do not need a channel (for example, you do not run display ads), you can disable it:

  1. Find the channel on the Channel Rules page
  2. Toggle it off
  3. Rebuild the script

Disabled channels are skipped during evaluation. Visitors who would have matched that channel will fall through to the next matching rule.

Editing a channel

To modify an existing channel’s conditions:

  1. Click on the channel name to open the editor
  2. Add or remove utm_medium values, utm_source values, click ID types, or referrer domains
  3. Save and rebuild the script

For example, you might add paid_social as an extra utm_medium value to the Paid Social channel if your ad platform uses that convention.

Adding a custom channel

To create a channel that does not exist in the defaults:

  1. Click Add Channel on the Channel Rules page
  2. Give it a name (e.g. “Partner Referrals”, “SMS”, “Podcast”)
  3. Set the detection conditions (which utm_medium values, utm_source values, referrer domains, or click IDs should trigger this channel)
  4. Optionally add filter conditions to narrow the match
  5. Drag it to the right position in the priority list
  6. Save and rebuild the script

Example: adding a “Partner” channel

Say you tag all partner links with utm_medium=partner. You could:

  1. Add a new channel called “Partner”
  2. Set the detection condition to utm_medium = partner
  3. Place it above Affiliates in the priority list (so it matches before the broader Affiliates rule)
  4. Save and rebuild

Now any visit with utm_medium=partner will be categorised as “Partner” instead of “Affiliates”.

Rebuilding the script

After any change to channel rules, you need to rebuild your tracking script. Channel rules are baked into the JavaScript file at build time, so changes are not live until you rebuild.

  1. After saving your changes, click Rebuild Script (or Generate Script)
  2. Wait for the build to complete (usually a few seconds)
  3. The updated script is pushed to the CDN

You do not need to update the script tag on your site. The URL stays the same. The CDN serves the new version automatically.

Tips

  • Start with the defaults. Only customise channels if you have a specific reason to.
  • Keep more specific channels above broader ones. If two channels could match the same visit, the one higher in the list wins.
  • Fallback channels (Other Campaigns, Organic Social, Organic Search, Referral, Direct) should stay at the bottom.
  • After making changes, test with UTM parameters to confirm visits are categorised correctly. See Testing for how.
  • Channel names appear in your form submissions and CRM records (in the st_fc_channel and st_lc_channel fields), so pick names that make sense to your sales and marketing teams.

Related