Tracking social media with Google Analytics – 9 things you need to know

A quick introduction

Being present on social media is pretty much mandatory for anybody wanting to make meaningful connections with their audience. It's a way to provide support, share stories and reach new customers, but how well is it really performing for you? What's working? And what's not working?

This is where Google Analytics (and a few other tricks) can help you get the insights you need. I’m going to share how I track the performance of my own campaigns. And in case you don’t know, I love simple solutions, so I’ve included some tools you might want to use to make your life easier.

I’m going to walk through the following in this post:

  1. How social media is automatically tracked by Google Analytics

  2. How to correctly track your paid social campaigns

  3. Best practice for campaign tagged URLs for your social ads

  4. Comparing your organic (free) and paid social media efforts

  5. Using the social reports inside Google Analytics

  6. How to track social sharing widgets embedded on your website

  7. Tracking ‘dark social’ sharing (people sharing your URLs)

  8. The importance of using in-built analytics from social networks

  9. Getting quick insights from click analytics

So let’s jump in...

How social media is automatically tracked by Google Analytics

The first thing that’s really important when it comes to tracking social media is to understand what is (and isn’t) tracked by default into Google Analytics.

Let’s start with a simple scenario…

Let’s say someone comes to your website from Twitter (you could substitute Twitter with your social network of choice if you like, so this could just as easily be Facebook, LinkedIn or another social network).

Someone sees a Tweet that includes a link to your website, they click the link and end up on your website. So how is this person visiting your website going to show up inside your reports? Well, by default they’ll be seen as a referral because Twitter is a website that now links to your website.

Now there will be a source and a medium associated with the click through to your website. If you’re just getting started with Google Analytics, then source is ‘where the message is seen’ and medium is ‘how the message is communicated’. For Twitter you will have a source of twitter․com or t․co (which is Twitter’s own URL shortener) and since this is really a link from another website, the medium will be seen as a referral.

Google Analytics Tracking Social Media

If you head to your Google Analytics account you will find the ‘Source / Medium’ report within the Acquisition section. Here’s what we’d find:

Google Analytics Tracking Social Media

Remember that your social media sessions will automatically show up in a number of different Acquisition reports. Here you can see those reports highlighted:

Google Analytics Tracking Social Media

Tracking paid social media campaigns

Now that we’ve covered the default (automatic) reporting it’s time to cover paid advertising on social networks.

If you are investing in paid ads, then it’s critical to measure these properly. The way to do this is to use campaign tags which allow you to track your custom marketing campaigns, including social media and all your other inbound marketing.

You will need to customize all of the links you use in your paid social ads to include appropriate campaigns tags. Campaigns tags include the following:

  • Campaign name allows you to define the overarching marketing campaign. For example, you might just call the campaign Facebook Ads for ads running on Facebook or you might call it Spring Promotion or something similar for a time-sensitive campaign. It’s worth highlighting that it’s completely up to you how you name your campaign, so go with what you would like to see in your reports. My recommendation is to go with something simple and readable if you’re unsure.

  • Campaign source and medium are just like the default source and medium we covered earlier in the post. Remember that source is where the message is seen and medium is how the message is communicated.

  • Campaign content is optional, but can be used to distinguish clicks from different ads if you are running multiple ads on the social network. For example, if you have an ad with a ‘Register Now’ button and another ad with a ‘Learn More’ button you can use the content tag to view results from these ads separately in your reports.

If you’re interested in using campaign tags for your other marketing, then read my in-depth post on correctly tracking campaigns with Google Analytics.

You can use the Google Analytics URL Builder to create your campaign tags:

Google Analytics Tracking Social Media

This tool allows you to enter the values for the campaign name, source, medium and content. Here’s an example for an ad on Facebook:

Google Analytics Tracking Social Media

You need to enter the URL that people are going to click through to from the ad, along with the campaign tags we’ve covered. This will then create a long URL like this one:

This is the URL that we now use as the destination URL for our ad. When people click on the link they will be taken to the page we defined and the tags will be read into our reports for us.

Heading to our reports, we will see the following for the people who have clicked through from our ad:

Google Analytics Tracking Social Media

This allows us to see the number of users coming from the ad. The example also includes ecommerce data, allowing us to understand how successful our ads are at driving revenue. I’ve used ecommerce in this example, but this could just as easily be any goal you’ve configured for non-ecommerce actions taking place on your website.

Getting campaign tags right for ads on social networks

I’ve seen lots of different recommendations for how to create campaign tags for social networks, but the best way I’ve found for tracking social ads is to make sure you define the source as the domain name of the social network and the medium as social. Here’s an example of how I would campaign tag an ad on Twitter:

Campaign: twitter ads
Source: twitter․com
Medium: social
Content: learn more

And here’s an example of how I would campaign tag a similar ad on Facebook:

Campaign: facebook ads
Source: facebook․com
Medium: social
Content: learn more

Notice how I use the domain name as the source and always set ‘social’ as the medium. This allows Google Analytics to understand that clicks are actually coming from social networks (and not another type of campaign). This then means that you’ll continue to be able to see the users and sessions from your ads in the Campaigns reports, but you’ll also be able to see them in the Social reports and the Source / Medium report. 

If you used a campaign tag where the source was ‘fb’ and the medium was ‘paid’ then you wouldn’t see any data for the campaign within the Social reports. That’s why I always recommend setting the source as the domain name and the medium as ‘social’.

Comparing your paid and organic social media efforts

Now that we’ve campaign tagged our paid ads appropriately and remembering back to our Twitter example at the start of this post, you will be able to compare your paid and organic efforts.

Let's look at a Facebook example to see this in action. Here we can see our report that includes both paid and organic:

Google Analytics Tracking Social Media

We can see facebook․com / referral which is all the traffic coming from my organic (free) social posts. And we can also see facebook․com / social which we know is from my campaign tagged URL for my paid ads. We have the best of both worlds using this technique! We can see organic and paid traffic in our reports.

If we then head to the Social reports inside Google Analytics this will show us a combined total. The reports will include both our paid and organic traffic.

Google Analytics Tracking Social Media

Remember you can always drill-down to split your paid and organic traffic using the other Acquisition reports.

Social reports inside Google Analytics

Google Analytics includes a dedicated set of Social reports. I like these reports because they clean things up for us and make it easier to understand the performance of the different social networks for our website.

Google Analytics Tracking Social Media

Here’s the Social Overview report:

Google Analytics Tracking Social Media

The Overview report gives you a top level summary of the performance of your social network traffic. Now, if you’re getting started, I actually think this report is a little confusing because it actually includes social traffic as well as non-social traffic.

Here I’ve highlighted the data which is for your entire website (which includes social and non-social traffic). The idea is that you can quickly compare the performance of social against your whole website.

Google Analytics Tracking Social Media

Network Referrals

Next we have the Network Referrals report. This is a fantastic report because it cleans up the names of the social networks for us.

Google Analytics Tracking Social Media

Instead of having and twitter․com you have Twitter and instead of having facebook․com and m․facebook․com you have Facebook, it just cleans everything up for us. This allows us to easily see all of our social traffic within Google Analytics.

Landing Pages

The Landing Pages report shows you the URLs that are landing on when they click through from links on social networks. 

Google Analytics Tracking Social Media

Clicking on a shared URL within the report will then show you a breakdown of sessions by each social network.


The conversions report shows you the total number of conversions and their value. This report uses ‘last click attribution’ which means that conversions will only be counted if someone converts after coming from a social network. If someone came from a social network and then came via another source, say email before converting, they would not be counted within this report. 

Google Analytics Tracking Social Media

If you’re wanting to understand the full impact of social, then I’d recommend using the Social Overview reports and looking for the ‘Contributed Social Conversions’ or using the Multi-Channel Funnels reports. All of this really refers to attribution (how you give credit to each conversion), so if you’re keen to learn more I’d recommend reading my post on Google Analytics attribution models.


I’ll talk more about this in a moment, but basically the Plugins report shows you onsite social activity that you’ve tracked.

Google Analytics Tracking Social Media

In some cases you’ll need to adjust your implementation to collect data for the report, but once you’ve got it up and running you’ll be able to report on people engaging with your social sharing widgets. For example, if you have a Facebook ‘like’ button you can track the number of likes you’re receiving on your content.

Users Flow

Finally, there is the Users Flow report which allows you to understand the navigation paths your social users are using once they’ve landed on your website.

Google Analytics Tracking Social Media

The report is presented visually with the larger elements indicating that more people are traveling through a particular path.

Tracking social sharing widgets on your website

What do people actually share on your website?

Well, when it comes to Google Analytics there are a couple of options. As we’ve seen with the Social reports we can find details about our inbound social traffic. This allows us to understand the social networks that are sending us traffic and what people are landing on and where they go on our website. 

On top of this we also have the ability to measure outbound social interactions. What do I mean by outbound you ask? Well, let's say you have a Facebook ‘like’ button on one of your blog posts, you can use Google Analytics to measure the interactions on these sharing widgets.

Amazing! Yay!

But there is one disclaimer – tracking social sharing widgets doesn’t happen automatically. We need to set this up in order for Google Analytics to collect and report on the data. 


I know, I know.

This is why you might want to consider a solution like AddToAny which allows you to easily implement social sharing on your website. You’ll have social sharing on your website in no time at all and it also integrates with Google Analytics.

AddToAny automatically sends data to Google Analytics if you have the tracking code embedded directly on your website. This works for the latest version of the tracking code (gtag.js) as well as analytics.js and ga.js.

If you’re using Google Tag Manager, you’ll need to follow the integration instructions for AddToAny to send data to Google Analytics.

Now I can see lots of people sharing it to Twitter, LinkedIn, Pinterest and all the other social networks using AddToAny.

Google Analytics Tracking Social Media

I do want to highlight that when adding any third-party script to your website it’s important to understand how data will be collected, processed, stored and used. While AddToAny says they are GDPR friendly, they are collecting data from your website. AddToAny’s privacy policy says:

You hereby grant AddToAny a non-exclusive, perpetual, worldwide and irrevocable right and license to utilize the Data to track, extract, compile, synthesize, aggregate, and analyze such Data, including, but not limited to, the creation of anonymous or pseudonymous usage data ("Usage Data"). We reserve the right to use, reproduce, distribute and display Usage Data, in our sole discretion.

This means you need to be comfortable with your data being used by a third party. If you’d prefer to keep your data private, then you’ll need to use another solution. I’ve switched to Social Share Kit which means the script is self-hosted and I can configure Google Tag Manager to track people engaging with my social sharing widget.

Tracking dark social (and what it is)

We’ve covered inbound social traffic, but there’s still a gap in what we’ll be looking at when it comes to our Google Analytics reports. This is called dark social. Sounds scary!

Dark social refers to traffic that originates from social networks that can’t be tracked. This might sound strange, but think about this scenario…

You share a link to your website on Twitter. Someone clicks that link and copies the URL of the page. They then email that link to a friend who clicks through to your website too.

Social media has played a role in getting both of these people to your website, but only the first person is counted as coming from Twitter. The second person is seen as direct without any detail about how the link was shared.

This is dark social.

So how can we measure this?

One solution is to use a tool like AddThis which gives you the ability to understand the number of people copying URLs from your website and sharing them. To configure this using AddThis you’ll need to adjust their code. From there you’ll be able to see the number of shares of your content, even if they don’t come back directly from a social network. Here you can see the report from AddThis:

Google Analytics Tracking Social Media

The way this works is that AddThis adds extra information to the end of the URLs as people visit your website. This information (hashtag) means that when someone copies and pages that URL the share can be reported. This gives you some clarity into people that are copying and pasting the URL from your website. 

To enable this feature you need to add the following configuration:

var addthis_config = {
  data_track_addressbar: true

The downside of using AddThis is that they collect and use your data in order to monetize their free service. I’ve played with their address bar tracking solution (and other solutions) in the past, but I’ve found the reports to be of minimal value. Instead of handing over your data and making your URLs stranger than they already are, I recommend keeping things simple.

So try this…

Create a custom segment that only includes direct traffic, but excludes pages that are easy for people to remember, like your website’s homepage. It’s unlikely that someone is actually typing in a super long URL, like the URL to one of your blog posts. It’s more likely that they’ve clicked a link that someone has shared with them. Using this custom segment you’ll now have an idea of the content that people are sharing with their contacts.

Importance of native social analytics

Next we have native analytics, or in other words, the in-built analytics of each social network. 

It's important to understand that Google Analytics is not going to be able to track absolutely everything because unfortunately it simply can't provide every piece of data we might want. For example, we can’t add Google Analytics tracking code to our posts on LinkedIn or our Facebook page. They're just not going to let us do that (although it would be awesome).

What we need to do is supplement what we're doing with Google Analytics with the native analytics from each social platform we’re using.

One example of this is when you want to understand the performance of your content within a social network. We're not always running campaigns where we're expecting people to click through to our website. Instead, we might be trying to engage with our audience within the social channel itself. By using the in-built analytics we can understand which content is more engaging or less engaging.

I’m going to use Twitter my next example.

When we post content on Twitter some people will click through to my website, but I also need to understand the performance and impact of my post even if people don’t click through.


Well, I need to know what to post next. Here I can see a post that has 61 likes, 17 retweets and one comment.

Google Analytics Tracking Social Media

I can immediately see what’s driving engagement and this tells me the type of content we should be posting more of. Amazing!

The same applies to any social network you’re using, from Facebook, Instagram, Twitter or LinkedIn. You need to understand which pieces of content are driving the most engagement. This allows us to supplement our Google Analytics data with native analytics for additional insights into our performance.

Here are my top tips when it comes to using native analytics...

  1. Use native analytics to understand your most engaging organic content within the individual social networks themselves

  2. If you’re promoting a post on Facebook, Twitter or another network, to boost the number of likes then use native analytics. (Or in other words, if you’re not running a clicks campaign.)

  3. Use native analytics to review the cost-based performance of your ads.

Using click analytics for insights

Finally, I wanted to give a quick shout out to click analytics for your social posts. We find this data really useful here at Loves Data.

Yes, you can certainly jump into the native tools themselves, but if you want to get details about what people are clicking on, especially if you're creating lots of content, for example, on Twitter, there's going to be lots and lots of data to review, so you need a quick, simple way to understand what's engaging.

We really like using Buffer which allows you to schedule your social posts. The awesome thing is that you can jump into the analytics section of Buffer to understand which pieces of content are most engaging for your audience.

Google Analytics Tracking Social Media

There are some good options in Buffer. You can sort by what’s popular, so by comments or likes or clicks, or you can also sort by your least popular posts too. You can then learn from this to understand, "Well, what can I do more of and what should I potentially be doing less of when it comes to my social posting?" I’m definitely a big fan of Buffer for quick insights.


As we’ve covered, you’ll find incredible insights in your Google Analytics reports. You can then extend your data by tracking your embedded social sharing widgets and by correctly campaign tagging your inbound traffic coming from social ads.

You’re going to rock tracking your social media efforts using Google Analytics!

And you also know the limits of Google Analytics. You know that you can supplement Google Analytics with data directly from the social networks themselves. Remember this is super important for understanding the performance of your content within the social networks themselves.

So start finding the insights you need to improve your social content. Start by asking yourself the simple questions of “What’s working?” and “What’s not working?”

Don’t overthink it either. You’ve got this.