Skip to main content

How to add a traffic source or campaign

Create traffic sources and campaigns in your Website Analysis, so you can see exactly which channels and campaigns are bringing visitors to your site.

Written by Samhub

Traffic sources let you see which channels and campaigns drive which audiences to your website. A traffic source can be a general channel, like Facebook or Google, or a specific campaign that you track using UTM tags. Your website analysis comes with Direct Traffic, Facebook, and Google set up by default, but you can add your own traffic sources and campaigns too.

Add a traffic source

1. Open the traffic source filter

Above your website data, click the first filter button (it says "All traffic" by default) to open the dropdown menu.

2. Add a new traffic source

At the bottom of the dropdown, click "Add traffic source."

3. Name your traffic source

For example, "Facebook Traffic." Then click "Add condition."

4. Set up your condition

Choose "AND" if all your conditions need to match, or "OR" if any one of them matching is enough. OR is the most common choice for traffic sources, since it allows for multiple variations of a referrer URL to be added.

Then choose a parameter (for traffic sources, "Page Referrer URL" is commonly used), a condition (for example, whether it should equal or contain a value), and enter the value you want to match, like "fb."


Set up a campaign

A campaign is set up the same way as a traffic source, but instead of matching a referrer URL, you match the UTM tags in your campaign's URL.

1. Create a new traffic source

Follow steps 1 and 2 above to open the filter and click "Add traffic source."

2. Name your campaign

For example, "My Campaign." Then click "Add condition."

3. Add your UTM conditions

For a campaign, you'll usually want at least these three:

  • utm_campaign: usually used for the campaign's name.

  • utm_source: usually used for the platform the campaign is running on, for example Facebook.

  • utm_medium: used to tell ad types apart, for example a banner ad versus a PPC ad.

Adding all three lets you track a specific campaign, for example one running banner ads on Facebook.

4. Add custom parameters for extra precision, if you want

This is useful if you're targeting different audiences or testing different creatives. For example, you could add a utm_content condition to identify an ad by the image it uses.

5. Click "Create"

Finish setting up your campaign by clicking "Create". It will now show up as a traffic source you can filter by.


Understanding UTM parameters

UTM parameters are small tags you add to the end of a URL to track where your traffic is coming from. When someone clicks a link with UTM tags, Samhub can read those tags and match them to a traffic source or campaign you've set up, using the conditions above.

The parameters used in this article are:

  • utm_campaign: the name of your campaign.

  • utm_source: where the traffic is coming from, like Facebook or a newsletter.

  • utm_medium: the type of traffic or ad, like a banner, a social post, or an email.

  • utm_content: an optional, more specific tag, useful for telling apart different ads, creatives, or audiences within the same campaign.

Rather than adding these tags to your URLs by hand, you can use a free tool like Google's Campaign URL Builder to generate a properly tagged URL. Just make sure the values you use there match the values you enter in Samhub, so your traffic gets tracked correctly.


View your data

Click the traffic filter again, then search for or scroll to find your traffic source or campaign. Click it to select it. You can select multiple traffic sources or campaigns at once.

Once selected, your website analysis will show the data for just that traffic source or campaign.

From here, you can go even deeper by adding a conversion point or focusing on a specific audience, more on that in the next article.

Did this answer your question?