Author

Analytics expert

SEO passionate

User Experience obssessed

Follow me on
Category | Google Analytics
Difficulty |

Combining Facebook Referrals for Better Reporting: lm.facebook, l.facebook, m.facebook

If you use Facebook to drive traffic to your site, and Google Analytics to analyze those visits, there is a good chance that you came across multiple referrals including m.facebook.coml.facebook.com, and lm.facebook.com.

  • facebook.com / referral
  • m.facebook.com / referral
  • mobile.facebook.com / referral
  • web.facebook.com / referral
  • l.facebook.com / referral (is an "L" not i.facebook.com)
  • lm.facebook.com / referral (is "LM" not im.facebook.com)
  • business.facebook.com / referral
  • touch.facebook.com / referral
  • review.intern.facebook.com / referral
different-facebook-com-referrals-l-lm-m-mobile-web

All these different referrals are just how Facebook handles their links internally, but they don't add any value to your Analytics, quite the contrary, they only split your data, making harder it to analyze your Facebook campaigns and posts. 

Why Should You Combine Facebook Referrals?

When you check other sources, like LinkedIn or Twitter, you will find only one referral, independently of the device or situation they come from.

This is exactly how you want your sources/referrals to show, because that way you can effectively segment them later however you want in Analytics, by devices, by cities, etc.

Facebook (Instagram also), on the other hand, splits your data across different referrals which makes the analysis of your data more complicated.

How to Combine Facebook Referrals for Better Reporting?

Facebook referrals that you need to combine:

  • l.facebook.com
  • lm.facebook.com
  • web.facebook.com
  • mobile.facebook.com
  • touch.facebook.com

Others, such as the referral business.facebook.com, may have another source that is not real users, so we will leave them as they are.

To unify the rest you will have to create a "search and replace" filter to combine all Facebook referrals.

Note: Before proceeding, I highly recommend you to create an unfiltered view if you haven't done it. This is a best practice that every analytics user should follow.

You have 2 options to do that:

Combine m.facebook.com, lm.facebook.com and l.facebook.com referrals Google Analytics
  1. Combine all Facebook referrals in one (Recommended): All your Facebook referrals (l.facebook.com lm.facebook.com, m.facebook.com) will all show as facebook.com in your reports.
  2. Combine Facebook referrals by device: If for some reason you want to keep the mobile m.facebook.com and desktop facebook.com version separated (although there are other better ways to do differentiate devices in GA) 
    • Desktop Referral: l.facebook.com and web.facebook.com to facebook.com
    • Mobile Referral: lm.facebook.com and mobile.facebook.com to m.facebook.com

Do you need help with this or any other configuration of your Google Analytics?

  • Spam and bot protection
  • Advanced tracking (events, goals, etc)
  • E-commerce
  • Scheduled reports
  • Customizations (Dashboards, Data studio)
  • Google Tag Manager
  • Integrations

Option 1: Combine All Facebook Referrals

All Facebook referrals in one:

  1. Go to the admin section (gear icon at the bottom left) of your Google Analytics, click Filters under the View Column (Last one).
  2. Click the red button +Add filters and enter "Unify Facebook Referrals" as a name.
  3. Select Filter Type Custom
  4. Select Search and Replace (you might need to scroll a little) combine l.facebook.com and lm.facebook.com referrals google analytics
  5. Configure the filter as following
    • Filter Field find and select:  Campaign Source
    • Search String enter: ^(m|lm|mobile|l|web|touch)\.facebook
    • Replace String enter: facebook

    If you click the verify button, you will get a quick glance of how the filter will work.

    unify l.facebook.com and lm.facebook.com Google Analytics

    Note: You may get the message "This filter would not have changed your data" don't worry the filter will still work, this happens when there is no match in the small sample data used by this feature.

  6.  After configuring your filter, click Save
How to Combine m|lm|l.facebook.com Referrals for Better Reporting in #GoogleAnalyticsClick To Tweet

Second option Facebook referrals by device

Option 2: Combine Facebook Referrals by Device

Split mobile and desktop Facebook referrals:

You will need two filters for this. Follow the same steps above, and adjust the STEP 5 filter configuration for each filter like this:

  • Filter name: "Unify Desktop Facebook Referrals."
    • Filter Field find and select: Campaign Source
    • Search String enter: ^(l|web)\.facebook
    • Replace String enter: facebook
  • Filter name: "Unify Mobile Facebook Referrals."
    • Filter Field find and select: Campaign Source
    • Search String enter: ^(lm|mobile|touch)\.facebook
    • Replace String enter: m.facebook

That's it from now and on your Facebook referrals will be better reported.

What is the Meaning of the Different Facebook Referrals?

Now you know that these multiple referrals don't add any value to your Analytics and you should combine them. Using the methods above.

But why are the split like that? and what's their meaning?

As I mention before this is only how Facebook handles their links internally and has nothing to offer to your Analytics. But to help you understand, I'll describe the most common ones.

What is m.facebook.com?

This one is easy. As you probably imagine, the referral preceding by an m. comes from mobile devices, while the regular one "facebook.com" comes from a desktop/laptop computer.

In some occasions, you may see them as web.facebook.com (desktop) or mobile.facebook.com

What is l.facebook.com?

Whenever you see the referral l.facebook.com it means that the user passed through a Link Shim before arriving at your site. 

A link shim (represented by the letter "L") is a privacy measure introduced by Facebook in 2008 and has two purposes:

  1. Protect the privacy of the user by removing any personal information in the referrer (URL) like IDs or usernames.
  2. Protecting the user from Malicious Sites: Facebook checks every for flagged sites and if they detect one it shows a warning to the user so he/she can continue or cancel the action.

Now, don't worry!, most of the time when you see an l.facebook.com is just because of privacy reasons. But if you want to make sure you are not flagged, just open one of your links from Facebook, if you don't see any warning then it's OK.

What is lm.facebook.com?

The referral lm.facebook.com is exactly the same as l.facebook.com the only difference is that the user came from a mobile device

How to Combine m|lm|l.facebook.com Referrals for Better Reporting in #GoogleAnalyticsClick To Tweet

Wrapping it up

Most of the time you will see your referrals with only one name (like Twitter or LinkedIn).

In Facebook case, you can find up to multiple different referrals. This extra information will only split your data and make it more difficult to analyze.

To avoid this, you can easily combine them and get better reports from Instagram.

How to Combine m|lm|l.facebook.com Referrals for Better Reporting in #GoogleAnalyticsClick To Tweet

Improve the quality of your Analytics data

Answer the following basic questions:

  1. Do you have filters for ghost, crawler and language spam?
    • If yes, Are those filters efficient? meaning you don't have to create/update them constantly.
  2. Are you blocking good bots and spiders?
  3. Are you filtering development and test environments?
  4. Are you filtering internal traffic (traffic generated by you or your team)?
  5. Do you have a clean segment to remove spam from your historical data?

If any of your answers is "NO," then you probably are getting junk traffic that is corrupting your data.

The following guide will help you set everything your Analytics needs to receive not only clean but also meaningful data! Go to the guide and get your Google Analytics in shape.

Do you need help with this or any other configuration of your Google Analytics?

  • Spam and bot protection
  • Advanced tracking (events, goals, etc)
  • E-commerce
  • Scheduled reports
  • Customizations (Dashboards, Data studio)
  • Google Tag Manager
  • Integrations
Author

Analytics expert

SEO passionate

User Experience obssessed

Follow me on
Be the first to comment :)