Combining Referral Traffic in Google Analytics

Google Analytics is a free and robust tool that gives us valuable information about our website and traffic. Analyzing this data allows us to maximize our marketing strategies to increase conversions. The only drawback is Google Analytics provides data in “raw form,” making it difficult to read and take action on. In essence, Google Analytics is really only as good as you have it set up. And a great place to start organizing is by combining referral traffic.

Google Analytics is only as good as you have it set up

Google Analytics helps you understand how people find your website by tracking where they came from before they landed on your site. Knowing which social networks are driving traffic to your website is a big part of understanding where you should FOCUS your efforts to get results.

When a user clicks a link from FaceBook, Twitter, LinkedIn, etc. Google Analytics records this information. The only issue is there are several variations of these platforms ( ie. m.faceboom.com, l.facebook.com, facebook.com, lm.facebook.com, etc.) listed out separately making it hard to analyze. Having to search for all the different variations of traffic creates an extra step and is inefficient. Grouping all the same traffic sources together will allow you to easily see your total traffic for each source.

Make your data easy to read so you can take action.

I want to show you how to easily clean up your referral sources so when you look at the report you only see ONE referral source for EACH traffic source. By seeing all your FaceBook traffic or Instagram traffic grouped together you can EASILY know what is working and what is not and make decisions accordingly. Learn how traffic data should drive your marketing strategy.

If you are just starting out you may not have a lot of traffic or see much need for it but as your business grows so does your traffic and this data can quickly become overwhelming.

Pro-Tip: Combining referral sources is not retroactive so the earlier the better when setting this up.

Combining all the different social referral sources in your reports is easier than you think. I am going to show you exactly how to keep things tidy and accessible by combining referral sources in only a few steps.

Combining Referral Traffic

To combine referral traffic you will create a filter in the view settings to combine all of the different variations of a social network referral source in your reports. For this step-by-step guide, I will use FaceBook as an example.

Open the admin settings of your Google Analytics account. Check to see you are in the right account, property, and view by verifying the name on each tab. Once you know you are working under the right account head over to the View tab.

  1. Within the View tab click Filter. Then click Add Filter.
  2. Under Filter Name give it a name (ie. Combining Traffic Facebook).
  3. Click Custom and click on Search and Replace. Under the Filter Field click the down carrot to select Campaign Source.
  4.  Enter a Search String. This is where you will enter a regex. A regex is basically a sequence of characters to include or exclude data. So for our example with Facebook you will want to enter in the Search String ^.*Facebook.*$ – These characters “tell” it to search (for anything where regardless of what’s before or after ‘Facebook’ ) and replace that with Facebook. So for example in your traffic data if you see m.facebook, l.facebook, etc. (or any variation) it will combine them and replace them with only the name Facebook.
  5. Do not check off Case Sensitive.
  6. That’s it click Save.

Voila moving forward all your traffic sources will be grouped together and you can easily see Total Traffic! No more scrolling through trying to add numerous traffic sources together.

Be proactive and set these up for any social media platforms that send traffic to your website. Follow the step-by-step above and repeat this for each traffic source (LinkedIn, Twitter, TikTok, Instagram, etc.).

If you have had traffic in the past couple of days you can verify this filter and see it working. But as long as you follow the format ^.*platform_name.*$ exactly that is all you need to do to combine referral sources.

Pro-tip – Best practice to not add any filters to your AWSD view

I can’t over emphasis the importance of having MULTIPLE views in Google Analytics to protect yourself. What I suggest doing when creating new filters is to create a NEW view and add any filters there. You can create up to 25 views, which is more than you need.  Think of your AWSD as a backup, if in the off chance you ever make mistakes you won’t accidentally lose data because it will be backed-up in your AWSD View.


Facebook (and all social networks) will be reported as a number of different referral sources in Google Analytics by default. This adds another step to reporting since you will need to search for all of the different Facebook subdomains or apply a custom segment to your reports.

To keep things neat and tidy in your reports, consider adding a view filter to combine all of the different referral sources in your reports. My favorite report for getting insights into how your visitors are finding you is with the source/medium report.