How to group social media referral sources in Google Analytics for better reporting

how to fix social media referral sources in google analytics

Who hasn’t seen different types of social media referrals reported in Google Analytics for Facebook, Twitter, LinkedIn, Pinterest and Instagram? Maybe you have seen social referrals such as t.co, m.facebook.com, l.facebook.com, twitter.com, lnkd.in, lm.instagram.com, m.instagram.com, pinterest.com, uk.pinterest.com, etc. The list can get quite big if you are receiving lots of traffic from the different platforms.

All these social media referrals types in Google Analytics can cause confusion and can make your GA reporting a nightmare or even inaccurate! Fortunately there is a solution, we can unify all these referrals using Google Analytics filters.

If a lot of your traffic comes from social referrals, reporting can be quite chaotic!

I must admit I see this problem 90% of the time when working on a Google Analytics audit for a client. I always say that having the Google Analytics code on a website doesn’t mean that the works ends there. In addition, there are many elements that can be improved and tracked in order to end up with accurate meaningful data and one of them is sorting out the social media referrals.

If you are wondering how social media referrals grouping work in Google Analytics and want to end up with a total figure for Twitter, Facebook or any of the other social networks, then keep reading this post. In this post I am going to show you how to combine the different referrals from social media by grouping them using filters in Google Analytics.

Here are the points I am going to go through on this post:

Let’s start!

The different types of social media referral sources

Traffic from the different social media platforms is reported on Google Analytics as a number of different social referrals. If you look at the data under “Acquisition” > “All Traffic” > “Source/Medium” you might see referrals such as m.facebook.com, l.facebook.com, lm.facebook.com, t.co, twitter.com, l.instagram.com, pinterest.com, pinterest.co.uk, lnkd.in, etc.

You might find the following social media referrals in Google Analytics for Facebook, Twitter, Instagram, LinkedIn and Pinterest.

I will show you how to combine social media referrals on Google Analytics using filters later on this post. Keep reading!

Facebook Referrals

Facebook has lots of referrals which can be grouped and, depending on your data, you might see some of them repeating more than others. This is the case with the first highlighted four Facebook referrals on the list below, they tend to be the most common ones you will find on your reporting. However, you can also find other ones including the ones on this list. I will show in the section below how to create Facebook referrals grouping in Google Analytics.

  • facebook.com
  • l.facebook.com
  • m.facebook.com
  • lm.facebook.com
  • mobile.facebook.com
  • business.facebook.com
  • apps.facebook.com
  • web.facebook.com
  • l.alpha.facebook.com
  • touch.facebook.com
  • mtouch.facebook.com
  • es.es.facebook.com
  • en-gb.facebook.com
  • da-dk.facebook.com
  • de-de.facebook.com
  • es-la.facebook.com
  • pl.pl.facebook.com

Twitter Referrals

The most common Twitter referral sources are:

  • twitter.com
  • t.co
  • twitter

Find how to group Twitter referrals using Google Analytics social network filtering in the next sections of this post.

LinkedIn Referrals

Some LinkedIn referral sources in Google Analytics are:

  • linkedin.com
  • es.linkedin.com
  • lnkd.in
  • linkedin

Instagram Referrals

The most common Instagram referral sources in Google Analytics are:

  • m.instagram.com
  • lm.instagram.com
  • l.instagram.com
  • instagram.com

Pinterest Referrals

When it comes to Pinterest referrals sources, these can be overwhelming as there are so many of them! Here are some examples of the ones you might see in your Google Analytics referral sources report.

  • pinterest.com
  • pinterest.co.uk
  • uk.pinterest.com
  • fr.pinterest.com
  • es.pinterest.com
  • au.pinterest.com
  • nl.pinterest.com
  • pl.pinterest.com
  • pinterest.de
  • de.pinterest.com
  • gr.pinterest.com
  • pinterest.se
  • it.pinterest.com

Why combine social referral sources?

Social media platforms such as Facebook, LinkedIn, Pinterest, Twitter and Instagram tend to send different hostname URLs to Google Analytics. Although we can’t control it, what we can do is to apply Google Analytics filters to group all the social media hostname URLs that have referred traffic to the site.

With Google Analytics social network filtering we can combine all the referrals URLs from each of the social media platforms in order to have a better picture of the total traffic coming from a particular social platform.

If you want to know exactly the amount of traffic coming from a given social media platform I strongly recommend grouping the referrals from the social network in Google Analytics. In the next section I will show you exactly what to do in order to fix this issue and combine them.

How to group the different social media referral sources

Now that you know what are the different social network referrals and why it is best to combine them in your reports, let’s dive in on how to use Google Analytics for social network filtering and ultimately end up with better reporting.

To fix it, we are going to group each of the URLs in order to get a single source row in your Google Analytics reports. I will show you how easy is to do it using Google Analytics filters for each of the social media platforms. We will use the “Search and Replace” filter type to create our filter. Let’s start with Facebook!

Facebook filter to combine all referral sources in one

You will need to combine all Facebook referrals showing in your Google Analytics so they appear as coming from “facebook” and avoid getting different referrals like the ones I mentioned earlier on this post.

To fix this, go to Google Analytics > Admin > View (choose the view you want the filter on) > Filters > Create New Filter

Note: You can also create the filter in Account, it is up to you. I personally prefer to create them under “View” because I like to choose the view I want to implement the fix first. But this is a matter of preference.

  • Filter Name: Unify Facebook Referrals (you can give it the name you want)
  • Filter Type: Custom > Search and Replace
  • Filter Field: Campaign Source
  • Search String: ^(m|l|mobile|lm|web|touch).facebook
  • Replace String: facebook

The filter verification will show you the data after the filter is applied. Note that sometimes you won’t see any filtered data but that doesn’t mean that it is not working.

Once you are happy with the set up click the blue “SAVE” button.

Twitter filter to combine all referral sources in one

Twitter referrals grouping in Google Analytics works exactly the same with the Facebook ones. To unify all Twitter referrals showing on your Google Analytics account into “twitter.com”, go to Google Analytics > Admin > View (choose the view you want the filter on) > Filters > Create New Filter

Again, note that you can also create the filter in Account.

  • Filter Name: Unify Twitter Referrals (you can give it the name you want)
  • Filter Type: Custom > Search and Replace
  • Filter Field: Campaign Source
  • Search String: (^|.*.)twitter.com$|^t.co$|^twitter$
  • Replace String: twitter.com

You can check the filter verification to see how the data will appear after the filter has been applied.

Click the blue “SAVE” button and you are done!

LinkedIn filter to combine all referral sources in one

To group all the LinkedIn referrals on your Google Analytics account so they appear in a combined row as “linkedin.com”, go to Google Analytics > Admin > View (choose the view you want the filter on) > Filters > Create New Filter

Note: I use “View” but you can also set it up in “Account”.

  • Filter Name: Unify LinkedIn Referrals (you can give it the name you want)
  • Filter Type: Custom > Search and Replace
  • Filter Field: Campaign Source
  • Search String: (^|.*.)linkedin.com$|^lnkd.in$|^linkedin$
  • Replace String: linkedin.com

As with the previous examples, you can check the verification filter to see how the data will appear after the filter is applied.

Click on the “SAVE” button to save the filter configuration.

Instagram filter to combine all referral sources in one

To combine all Instagram social media referrals showing up in your Analytics reports into one “instagram.com” line, go to Google Analytics > Admin > View (choose the view you want the filter on) > Filters > Create New Filter

Note: You can also create the filter in “Account” if you prefer.

  • Filter Name: Unify Instagram Referrals (you can give it the name you want)
  • Filter Type: Custom > Search and Replace
  • Filter Field: Campaign Source
  • Search String: (^|.*.)instagram.com$|^instagram$
  • Replace String: instagram.com

Again, check the filter verification tool to see how the data will appear after the filter has been applied.

Click the “SAVE” button to save the filter.

Pinterest filter to combine all referral sources in one

Pinterest uses lots of referral sources including pinterest.com, pinterest.co.uk, uk.pinterest.com, fr.pinterest.com, es.pinterest.com, de.pinterest.com, etc. In order to fix your reports in Google Analytics showing lots referral sources coming from Pinterest, you will need to use the “Search and Replace” filter in Google Analytics.

To combine all the referral data from Pinterest, go to Google Analytics > Admin > View (choose the view you want the filter on) > Filters > Create New Filter

Note: You can also create the filter in “Account”.

  • Filter Name: Unify Pinterest Referrals (you can give it the name you want)
  • Filter Type: Custom > Search and Replace
  • Filter Field: Campaign Source
  • Search String: (^|.*.)pinterest.(.*)|^pinterest$
  • Replace String: pinterest.com

You can check the filter verification tool to see how your data will show once the filter has been applied.

Click the “SAVE” button when you are happy with the configuration.

Google Analytics social network filtering: An easy way to get better reporting

Combining your social media network referral data for better Google Analytics reporting is very easy! In this post I have showed you exactly what to do to improve the quality of your reporting. The solution is using the “Search and Replace” filter and if you follow the set up I have showed you for Facebook, Twitter, LinkedIn, Instagram and Pinterest you will find your social media reporting much easier to digest!

I am always up for better reporting!! Are you?

Do you need help with your Google Analytics? I can help you with the following:
* Google Analytics audits
* Gogle Analytics Implementation
* Google Tag Manager Implementation
• Goals and Events configuration
* Filters configurations
* E-commerce tracking set up
* Custom report dashboards using Google Data Studio

Let me help you! Contact me today 😊

How to group social media referral sources in Google Analytics for better reporting

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top