How to Track Facebook Shares in Google Analytics
You’re creating great content and your audience is sharing it on Facebook, but when you look inside Google Analytics, that valuable activity is often invisible. All you see is a lump of traffic from "facebook.com", with no way to know what came from a link in a post versus a share from your website. This guide will show you how to finally measure the true impact of your social sharing by tracking Facebook shares directly in Google Analytics.
Why Is Tracking Facebook Shares in Google Analytics So Difficult?
The core problem isn't your fault - it's how digital platforms are designed. Facebook and Google Analytics operate in separate ecosystems. When someone clicks a link shared on Facebook, Google Analytics registers that visit as coming from Facebook, but it has no native way to know the context of that click. Was it from your company's official post, a paid ad, or a user sharing your blog post with their network?
This lack of detail lumps all your Facebook referral traffic together, making it impossible to distinguish between traffic you generated and viral traffic your audience created for you. Without a specific tracking method, a click from a share looks exactly the same as a click from your page's feed.
The Value of Measuring Share Activity
Figuring out a way to measure this activity isn't just a technical exercise, it provides strategic insights that help you grow your business. When you can isolate the traffic and behavior of users who arrive from a shared link, you can:
Identify Your Most Viral Content: See exactly which articles, landing pages, or product pages inspire your audience to share. This helps you understand what resonates most and create more of it.
Understand the ROI of "Earned" Social Media: Go beyond likes and comments to see how shares translate into actual website sessions, engaged users, and ultimately, conversions like sign-ups or sales.
Spot Your Brand Advocates: While this method won't tell you who shared, a spike in share-driven traffic around a piece of content can signal a successful grassroots movement or an influencer taking notice.
Optimize Your User Experience: Is the content people share the most also the content that converts the best? Tracking this helps you learn whether your most "shareable" content is also effective at achieving your business goals.
The Solution: A Strategic Approach with UTM Parameters
The most reliable way to track Facebook shares in Google Analytics is by using UTM parameters. A UTM (Urchin Tracking Module) code is simply a tag you add to the end of a URL to tell analytics platforms more about where a visitor came from. By strategically adding these tags to the links embedded in your on-site "Share on Facebook" buttons, you can isolate that traffic and analyze it separately.
There are five standard UTM parameters, but we only need to focus on a few for this task:
utm_source: The platform where the traffic is coming from (e.g.,
facebook).utm_medium: The type of traffic it is (e.g.,
social).utm_campaign: The specific campaign you're running (e.g.,
q3_content_push).utm_content: This is our key parameter! We use this to describe the specific element that was clicked, allowing us to differentiate a "share button" from a regular post (e.g.,
facebook_share_button).
Setting Up Your Facebook Share Links for Tracking
To get started, you'll need to create a tagged URL for each piece of content you want to track. Instead of having your share buttons use a clean URL like https://yourwebsite.com/blog/great-post, you'll configure them to use a URL that includes your UTM tags.
Step 1: Build Your Trackable URL
The easiest way to do this is with Google’s free Campaign URL Builder. Let's walk through an example. Imagine we want to track shares for a blog post titled "5 SEO Tips for Small Businesses."
Head to the Campaign URL Builder and fill in the fields like this:
Website URL:
https://yourwebsite.com/blog/seo-tipsCampaign Source (utm_source):
facebookCampaign Medium (utm_medium):
socialCampaign Name (utm_campaign):
seo_content_2024(This can be whatever makes sense for your own organization).Campaign Content (utm_content):
on-page-share(This unique value is what lets you identify clicks from your share button).
The tool will automatically generate a new URL for you that looks something like this:
https://yourwebsite.com/blog/seo-tips?utm_source=facebook&utm_medium=social&utm_campaign=seo_content_2024&utm_content=on-page-share
This is the link you'll use in your website's share button.
Step 2: Update Your Website's Social Share Buttons
This is where things can get a little technical, but it's manageable. You need to configure the Facebook share button on your website to use the full, tagged URL you just generated, rather than the simple URL of the page itself.
The Facebook share functionality looks for a URL to pass along. Typically, a Facebook sharer link is structured like this:
https://www.facebook.com/sharer/sharer.php?u=YOUR_URL_HERE
You need to ensure that the YOUR_URL_HERE part is replaced with your new, UTM-tagged URL.
How you implement this depends on your website:
Social Sharing Plugins: Many popular WordPress plugins like Social Warfare, Monarch, or Sassy Social Share have settings that allow you to customize the URLs used in the sharing buttons. Look for options related to UTM tracking or URL customization.
Custom Development: If your buttons are custom-coded, you'll need to work with your developer to modify the code. You'll want to programmatically replace the standard page URL with the version containing your desired
utm_contenttag specifically for the share action.
Once implemented, when a user clicks your Facebook share button, the link they share will contain your tracking tags. Then, when their friends click that link, the activity will be properly tagged and categorized in Google Analytics.
Finding Your Facebook Share Data in Google Analytics
After your tagged links are live and people have started sharing and clicking, you can find the data inside Google Analytics. The process is slightly different depending on whether you're using the older Universal Analytics or the current Google Analytics 4.
For Google Analytics 4 Users
GA4 is the standard now, and it's built for this kind of detailed analysis.
Navigate to Reports > Acquisition > Traffic acquisition.
The default table shows traffic grouped by Session default channel group. To see more detail, use the dropdown to change the primary dimension to Session source / medium.
You should see entries for
facebook / social. This shows all your traffic from Facebook.To isolate only the traffic from your share buttons, click the blue "+" symbol next to the primary dimension dropdown and add a secondary dimension. In the search box, type "Session manual ad content" and select it. This is GA4's name for the
utm_contentparameter.
Your report will now show a new column. In this column, you can see traffic broken down by the utm_content value you set. Traffic with the value on-page-share is traffic that came directly from users clicking the shared links you tagged!
For Universal Analytics (UA) Users
If you're looking at historical data in UA, the steps are similar.
Go to Acquisition > All Traffic > Source/Medium.
Click on the
facebook / sociallink in the table to see only Facebook traffic.Above the table, click the Secondary Dimension dropdown.
Type "Ad Content" into the search box and select it. Universal Analytics uses this dimension to report on the
utm_contentparameter.
Just like in GA4, you will now see a breakdown of your Facebook traffic, with a specific row showing the data from your tagged share buttons.
Taking it Further: Analyzing the Impact of Shared Content
Finding the sessions is just the first step. The real value comes from analyzing what those users do. In GA4's Explore section, you can build a custom report to dig deeper.
Create a Free form exploration report with the following setup:
Rows: Add
Page path and screen classto see which specific pages are being shared and driving traffic.Columns: Add
Session manual ad content.Values: Add metrics like
Sessions,Engaged sessions,Conversions, andTotal revenue.Filters: Add a filter where
Session manual ad contentexactly matcheson-page-share.
This customized report will show you which specific blog posts or product pages are not only getting shared the most but are also leading to valuable business outcomes. You might discover that the article everyone shares drives less revenue than a less-shared but highly effective case study.
Final Thoughts
Implementing UTM parameters on your share buttons finally pulls back the curtain on "dark social" activity. This simple but powerful method allows you to move beyond guessing, providing clear data on which content truly motivates your audience to spread the word and how that "earned" traffic contributes to your goals.
While setting up detailed UTM tracking solves a big piece of the reporting puzzle, trying to connect user behavior across Facebook, Google Analytics, and your advertising platforms can still be a time-consuming manual task. We built Graphed because we believe valuable business insights shouldn't be so hard to find. You can connect your marketing and sales data sources in seconds, then use plain English to get answers and build real-time dashboards automatically - no more chasing data across a dozen browser tabs.