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:
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:
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.
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.