How to Fix m/lm/l.facebook.com in Google Analytics (2024)

Google Analytics

Taavi Kalvi

We’ve recently come across lots of digital marketers scratching their heads and asking:

  1. Why am I seeing all these unconventional Facebook referrals (lm.facebook.com, l.facebook.com, m.facebook.com, web.facebook.com etc.) in Google Analytics?
  2. Why are they split across different rows in our Google Analytics reports?
  3. How can I combine all Facebook referrals in one for better reporting?
How to Fix m/lm/l.facebook.com in Google Analytics (2)

This article will show you exactly what’s hidden behind these mysterious Facebook referrals and what can be done to avoid having your Facebook data split across several rows in your reports (how to fix m/lm/l.facebook.com in Google Analytics.)

How to Fix m/lm/l.facebook.com in Google Analytics (3)

Contents

  1. What’s hidden behind these baffling Facebook referrals?
    a) What is l.facebook.com / referral in Google Analytics?
    b) What is lm.facebook.com / referral in Google Analytics?
    c) What is m.facebook.com / referral in Google Analytics?
  2. Is it worth combining all those Facebook referrals together?
  3. How to combine all these mysterious Facebook referrals in one?

1. What’s hidden behind these baffling Facebook referrals?

Facebook’s primary goal is to protect its users from malicious and spammy content and that’s why they have built a powerful tool called the Link Shim.

l.facebook.com and lm.facebook.com are called Link Shim referrals. Their presence in Google Analytics indicates that your website was evaluated favourably by the Link Shim system developed by Facebook.

Every time a link is clicked on the site, the link shim system will check that URL against a huge internal database of malicious links.

If the system detects that the link you’ve clicked on is malicious, it redirects you to an interstitial page that warns you and gives you an option to return to Facebook.

How to Fix m/lm/l.facebook.com in Google Analytics (4)


If everything is fine with the website you’re planning to visit, you’ll be automatically redirected from an interstitial page to the final URL.

Keep in mind, every user who clicks on an external link on Facebook, is temporarily redirected to a link shim page, before being sent to the final URL. This is because Facebook needs to rewrite referrer data for security reasons.

P.S. If you see lots of different referrals (l.facebook.com, lm.facebook.com, m.facebook.com etc) in your reports, it doesn’tnecessarily mean that you website is malicious or spammy.

There’s a number of reasons for this link shim interstitial page being served:

1. Facebook wants to keep you away from malicious websites

Like mentioned before, Facebook is able to run a check at the time of a click (i.e. when a user clicks on an external link) and if they detect a malicious website, they will give you a warning.

It prevents us from seeing malicious or spammy content and that’s great.

2. Facebook wants to protect its users’ privacy and identity

Facebook wants to hide personally identifiable information (PII) from third party websites and the link shim tool is used to rewrite Facebook referrers.

For example, it removes usernames from referrer URLs, before web browsers send you to external websites so that your 3rd party analytics tools (Google Analytics for example) are not able to reveal who it is that clicked on the link (meaning the owner of the 3rd party website will not know your name when you click on their link).

Businesses often use Google Analytics UTM parameters to track the performance of different marketing campaigns.

3. Facebook wants to make your external analytics tools more accurate

By default, HTTPS websites do not send referrer data to HTTP (non-HTTPS) websites due to security reasons. If someone navigates from a HTTPS website to your HTTP website, the browser doesn’t send a referrer header (the document.referrer will be empty). This means that you’ll see that he/she came to your site directly (you’ll see direct / none in Google Analytics).

It was a problem for Facebook because there was a huge number of users using the platform over HTTPS and lots of 3rd party analytics tools were not able to correctly record traffic coming from Facebook.

Facebook solved this problem by routing the click through the link shim page that is a non-HTTPS page. Users will stay on the temporary link shim page a few milliseconds before being redirected to the desired web page. This is why you see an anonymous Facebook referrer rather than a referrer from an unknown source (direct / none) in Google Analytics.

a) What is l.facebook.com / referral in Google Analytics?

It’s a link shim referral generated by Facebook.

How to Fix m/lm/l.facebook.com in Google Analytics (5)


Facebook is not consistent with the naming conventions of its referral data and that’s why we’re seeing this l.facebook.com referral source in our Google Analytics reports. Technically, all the traffic from l.facebook.com, lm.facebook.com, facebook.com and m.facebook.com is the same it’s all Facebook traffic. The prefixes l. ; lm. ; m just indicate different devices (desktop and mobile).

P.S. Again, these prefixes are added to the referral in Analytics because every user who clicks on an external link on Facebook, is temporarily redirected to a link shim page, before being sent to the Final URL.

b) What is lm.facebook.com / referral in Google Analytics?

It’s also a link shim referral and it has exactly the same purpose as l.facebook.com. It just indicates mobile traffic.

How to Fix m/lm/l.facebook.com in Google Analytics (6)

c) What is m.facebook.com / referral in Google Analytics?

This referral shows traffic that has come from mobile devices. The regular one “facebook.com” indicates traffic from desktop devices.

How to Fix m/lm/l.facebook.com in Google Analytics (7)

2. Is it worth combining all Facebook referrals?

Yes, if you’d like to make it easier to gain valuable insights and you’re tired of seeing Facebook traffic split across multiple rows in Google Analytics.

Here’s how it looks like if you haven’t combined your Facebook referral data:

How to Fix m/lm/l.facebook.com in Google Analytics (8)


Here’s how it looks like if you’ve combined your Facebook referral data:

How to Fix m/lm/l.facebook.com in Google Analytics (9)

For analytics purposes, we recommend combining all Facebook referrals together so that you don’t need to use table filters or apply advanced segments to your reports every time to pull insights out of your data.

Keep in mind that if you combine these different sources together, you’re still able to segment your data later however you want (by the device, city, browser etc).

You can also keep one view unfiltered so that if needed you can analyze these separate referrals in the future.

3. How to combine all these mysterious Facebook referrals?

Here are some of the Facebook referrals that you should consider combining:

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

Here’s the step-by-step guide on how to combine them all:

1. Open the Admin section in Google Analytics by clicking the gear icon () in the bottom left corner.

How to Fix m/lm/l.facebook.com in Google Analytics (10)

2.Navigate to filters under the “View” column.

How to Fix m/lm/l.facebook.com in Google Analytics (11)

3.Create a new filter by clicking the “+Add Filter” button.

How to Fix m/lm/l.facebook.com in Google Analytics (12)

P.S. Only Google Analytics users who have Edit permission at the account level can:

  • Create/edit filters at the account level
  • Create/edit filters at the view level
  • Apply filters to any view in the account

If you have Edit permission at the view level, youcan only apply existing filters to or remove them from that view, but cannot create new filters or edit existing filters.

If you don’t have sufficient permissions to apply new filters, get in touch with the person who has an administrator access to your account.

4. Configure a new filter in Google Analytics.

Here’s how your filter settings should look like:

1) Choose the right method: “Create new Filter”
2) Give it a name (make sure you remember the purpose of this filter later)
3)Filter Type: Custom
4) Filter Subtype: Search and Replace
5) Filter Field: Campaign Source

How to Fix m/lm/l.facebook.com in Google Analytics (13)

5.Fill in the “Search String” and “Replace String” fields.

1) Search String: ^.*facebook\.com$
2) Replace String: facebook.com

How to Fix m/lm/l.facebook.com in Google Analytics (14)

P.S. You can also combine only specific Facebook referrals as well if you want. For example, if you only want to combine lm.facebook.com, l.facebook.com and facebook.com sources together, you can use these strings:

1) Search String: ^(lm|l).facebook.com$
2) Replace String: facebook.com

If you’d like to dive even deeper, you should read more about regular expressions for Google Analytics.

6.If you’d like to see how it works, click the verify button.

How to Fix m/lm/l.facebook.com in Google Analytics (15)

This verification system shows you which sources will be combined and how the source will look like in your reports in the future if you apply it.

P.S. Google Analytics filters do not work retroactively on past data already collected in a View. Filters will start working only from the moment they are created and they are not going to change your historical data. You can use segments or table filters in Google Analytics to combine historical data.

7.If you’ve verified that the filter works properly, click the “Save” button.
How to Fix m/lm/l.facebook.com in Google Analytics (16)

Final Thoughts

We hope this article will save you both time and tons of potential headaches in the future so you don’t have to struggle with those messy Facebook referrals anymore.

Here’s some additional reading on the subject written by Google Analytics specialists:

Feelfree to share this guide with your friends as well who might be struggling with the same problem. If you have any questions about the topic, please post them in the comments section below.👇

4 Shares

3 Comments.

How to Fix m/lm/l.facebook.com in Google Analytics (2024)

FAQs

What does M Facebook com mean in Google Analytics? ›

The regular one “facebook.com” indicates traffic from desktop devices. m.facebook.com just shows Facebook traffic from mobile devices.

Why is there an M in front of Facebook? ›

m.facebook.com is for mobile users, if you see any site starting with m.xyz.com means it's a mobile site. As you might guess, facebook.com is the main site. m.facebook.com is the mobile version, l. facebook is when a link goes through some special handling to hide/filter some potentially malicious links.

What is the difference between Google Analytics and Facebook Analytics? ›

Google Analytics is a comprehensive website measurement tool that can track overall website performance, including pageviews, unique visitors, time on site, and conversions. On the other hand, Facebook Pixel is designed specifically for tracking user actions on your website.

How do I turn off Facebook Analytics? ›

Change your off-Facebook activity settings
  1. Click your Facebook profile picture.
  2. Go to Settings & Privacy, then select Settings.
  3. Select Accounts center, then click Your information and permissions.
  4. Click Your activity off Meta > Manage Future Activity > Disconnect future activity.
  5. Select Continue, then hit Confirm.
Feb 2, 2024

How to setup Facebook Analytics? ›

To find The Facebook Pixel, go to Ads Manager and click on “Pixels”. The installation process is simple, and Facebook walks you through each step required. Once you install the Pixel, give it time to run. Then, your dashboard will populate with your analytics data.

What is LM Facebook.com referral traffic? ›

If you see 'l.facebook.com / referral' or 'lm.facebook.com / referral', it means that link shim assessed your site. Don't be confused. Both are link shim referrals. But remember, the one with 'm' is mobile traffic, while the 'l' comes from a desktop.

How do I check Facebook Analytics? ›

To see insights about your Page:
  1. Tap in the top right of Facebook, then tap your name.
  2. Tap then select the Page you want to switch into.
  3. Tap your Page's profile picture.
  4. Tap Manage at the top of your Page.
  5. Tap See more insights.

What is the m in Facebook URL? ›

The "m" that appears before the URL of Facebook, as in "Facebook - log in or sign up," typically indicates that you are accessing the mobile version of the website. This convention is common for many websites and serves to distinguish between the desktop or standard version of the site and the mobile-optimized version.

What is the source of Facebook in Google Analytics? ›

Google Analytics reports website traffic that comes from Facebook as referral traffic, which means that a visitor landed on your website after clicking an inbound link from another website. Your website visitors that came from Instagram, Twitter and Yelp are more examples of referral traffic.

What is the difference between Facebook com and Facebook net? ›

What on earth is Facebook.net as opposed to Facebook.com? Facebook.net is a domain registered by Facebook, per Whois. No site is delivered from that second-level domain (where net is the top level), but at least one subdomain does deliver normal content, specifically open source software: mirror.facebook.net.

How to connect Google Analytics to Facebook? ›

Head to 'Events Manager'. Click 'Connect Data Sources', select 'Web' and then 'Get Started'. Install Facebook Pixel: Follow the instructions to install Facebook Pixel on your website. This little piece of code is a key to tracking your website visitors from your Facebook page or ads.

How to track Facebook leads in Google Analytics? ›

Once you login to your Google Analytics account, go to Acquisition > Campaigns > All Campaigns and search for your campaign name. Alternatively, in the Acquisition drop-down menu, click Source/Medium and then select Facebook Ads. Both will show you Google Analytics data derived from your Facebook traffic.

Why do Facebook ads not match Google Analytics? ›

Facebook and GA4 track users differently

Google Analytics 4 uses first party cookies to capture data about web visitors. If a user doesn't accept cookies or has JavaScript disabled, then GA4 can't track their touchpoints. On the other hand, Facebook doesn't require cookies to track clicks on an ad.

What does Facebook referral mean in Google Analytics? ›

By default, Google Analytics sees people coming to your website from Facebook as a referral, which is an inbound link from another website. This is the case for people finding your content on the Facebook app and the Facebook website.

What does the M stand for in Facebook? ›

m stands for mobile, so m.facebook.com is the mobile version of Facebook with a different appearance. Anyone who accesses facebook using the mobile phone will be redirected to this mobile version for faster loading.

Why does Facebook have M? ›

Generally good websites having different different layout for various version like mobile, Desktop, Tablet and all. For the ease of users and... The "m" that appears before the URL of Facebook, as in "Facebook - log in or sign up," typically indicates that you are accessing the mobile version of the website.

What is l facebook.com as a source? ›

l.facebook.com is a valid Facebook referral with a small caveat. The letter “L” at the beginning of the URL simple means that the user was redirected through a Link Shim before arriving at your site.

Top Articles
Latest Posts
Article information

Author: Arline Emard IV

Last Updated:

Views: 6022

Rating: 4.1 / 5 (72 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Arline Emard IV

Birthday: 1996-07-10

Address: 8912 Hintz Shore, West Louie, AZ 69363-0747

Phone: +13454700762376

Job: Administration Technician

Hobby: Paintball, Horseback riding, Cycling, Running, Macrame, Playing musical instruments, Soapmaking

Introduction: My name is Arline Emard IV, I am a cheerful, gorgeous, colorful, joyous, excited, super, inquisitive person who loves writing and wants to share my knowledge and understanding with you.