If you promote website(s) via Facebook and then want to measure their performance with Google Analytics, you will soon run into a practical problem. The visit from Facebook comes in from different referrals / referrals, which makes analyzing in Google Analytics very impractical.
Well-known references from Facebook include:
- m.facebook.com
- l.facebook.com
- lm.facebook.com
- facebook.com
In Google Analytics, this looks like this:
do you use Facebook advertising? Then always use UTM tags when composing your ads.
What are these references?
These are all "just" visitors from Facebook. The differences are in here mobile (m. / lm.) and desktop (l.) users. so it often happens that you have about 4 different references in your statistics for visitors from Facebook.
Why is Facebook doing this?
Facebook uses a tool that they call the "Link Shim". Achieves the following:
- Prevent visitors from being directed to spam or "unsafe" websites
- Safeguarding the privacy of Facebook users
Anyone who clicks on a link within Facebook will first pass the "link shim". This is a disambiguation page that checks that the hyperlink does not exist in a large database of known spam or "unsafe" websites (see point 1). This also provides another reference (l.facebook/m.facebook.. etc.). This also prevents privacy-sensitive information, such as user names, from being automatically provided as a reference (see point 2).
The URL of the "link shim" looks like this:
https://l.facebook.com/l.php?u=https%3A%2F%2Frooza.nl&h=ATOIJodQc5fYqo0wyjk8IOzSqqxI9wvSTqg7U6L2py0J4-LYdbNOFJNf-u6MgrkuAt3L6RWTPNjYMbhtLcyxEQmQiFIzkxGjO9B6xC9Y7X0HN8UH8rjHta1GSk7bNpIxGYDs6EwoFogWvy9JOujc_E6zx2A12OJS6fhzgSdJlKuP_6oCr11wOyb7OFaRCDwlkjSjjOgwGrQdHBSAC3Pqfz00FLIoil-GpJr2nnjUChwkrYdqp8z82azapiiYGEqQgqXuTcBJfFLFGMbgJtwr
The long letter-and-number knit (the "hash") in the URL is an additional security measure of Facebook. This prevents Facebook from allowing malicious parties to misuse the "link shim" tool to create URLs that appear to be from Facebook. If this hash is not correct, or if it is omitted altogether – Facebook will show a notification to make it clear that the final website is not part of Facebook.
Ok, but how do I keep my Analytics organized?
Since every Facebook referral concerns "just" visitors from Facebook, it has no added value to continue to see them as separate referrals in Analytics. It is best to apply a filter that merges these references, which is very useful!
Pro tip: If you go "busy" with filters, always have a view (or "view") without filters. This way you always have the original /raw data.
Filter settings
To merge all Facebook references up to 1, you can create and apply the following filter:
Filters can unfortunately not be applied retroactively, but this prevents a lot of (future) frustrations.