Measuring Content Engagement in Google Analytics - Part 3: Social Site Exits

William Julian-Vicary

Strategy & Innovation Director

  • Knowledge
  • Analytics
  • Measuring Content Engagement in Google Analytics - Part 3: Social Site Exits

Content Engagement Metrics Toolkit for Marketers:

  1. Article Completion Rate
  2. Social Sharing
  3. Social Exits
  4. Video Engagement - Coming Soon
  5. Content Copying - Coming Soon
  6. Page Printing - Coming Soon

Social Exit Tracking

Difficulty: 2/5

Requirements: Google Analytics, Google Tag Manager


Site exits aren’t typically an ideal situation. However, there are times where they should be measured as a small win. If, for example, you have a strong desire to send users from your site over to social media networks for further coverage, this is a winning exit, not a loss..

Other examples might be when you have 5 partner sites with varying domains - while it may be considered an exit in Google Analytics, you should mark this departure as one which is leading to another part of your business.

In this article I’m just focusing on Social Exits. This is where a user leaves your site by clicking on a link which is specifically pointing at a social media page owned by your company.

The setup for this one is actually really simple. It relies on a couple of things:

  • A GA Event Tag
  • A Link Click trigger
  • A Regex Lookup Table

New Variable: Regex Lookup Table

It’s a straightforward regex lookup table, we use regex because then we can enable a partial match, just in case of the occasional stray trailing slash etc.

Make sure you untick Full Matches Only and Enable Capture Groups and Replace Functionality. A rule of thumb with the last one is to only enable it if you intend to use it. This can create some odd outputs if you are unsure how capture groups work.

New Trigger: Link Click


This Link Click trigger is going to utilise the “Wait for Tags” command. This tells GTM to hold fire on allowing the link click action to do anything until 2 seconds is up OR the affected tags have fired successfully. The reason we do this is because if your social click takes your user off site within the same tab, the site might change before GA has had a chance to report the event meaning it's not going to register.

From a user’s perspective, they won’t notice the delay. You could make it shorter but 2 seconds is the default set by GTM and provides a good safety net.

New Tag: Google Analytics Event


The tag is also fairly straight forward. The only thing you’ll need to do is adjust the “Custom Metric Index” number so it matches your own Google Analytics settings. To create a metric for this event, head over to your Google Analytics Admin panel:


Click “+New Custom Metric”

Name your new custom metric “Social Exits” - always go with pluralised names for Metrics because when you report on them, it makes far more sense. We’re not looking at a single action, we are going to be summarising many.

Once saved, you’ll be able to find out the Index number to use within the GTM Tag. For us, it’s 6:


With this index number memorised, head back to your tag and add it as a Custom Metric:


With everything set, try previewing your container and testing some social links on your site. So I can actually see the event fire in Preview Mode, I will test by using CTRL+Click which opens the URL in a new tab.


If I open up the Event, I can see all the information passed to GA:


This is working exactly as intended - the next part is to publish your work and let the data collect. Depending on how much volume your site receives, you might be able to start seeing the effect within a day or two.  If you jump into Google Data Studio, you could make a table with the Dimension “Page” and the metric “Social Exits” to gauge which pages trigger users to exit to social media, if any.

Related Posts

Extracting Query Parameters in Google Analytics - Free Tool

Auditing your Google Analytics account for query parameters can be tedious but helps keep page reports clear of unwanted row duplication. We talk about the effects of collecting unwanted queries on your reporting and how to fix it. We’ve also built a free tool to make the process easier.


3 months ago

Tracking HubSpot Forms with Google Tag Manager

When a form has been successfully submitted to HubSpot, HubSpot propagates an event that we can listen to and use to trigger marketing tags within Google Tag Manager. Below we create a Custom HTML Tag that listens for a form success, trigger a dataLayer event which can then be used to trigger a marketing tag to push this data into Google Analytics.


4 months ago

How to get Service Provider back in Google Analytics

Service Provider and Network Domain dimensions are no more. Let’s get Service Provider data back online. We’ll show you how to re-enable ISP data using Google Tag Manager and an IP Lookup Service.


4 months ago

Measuring Content Engagement in Google Analytics - Part 2: Social Share Click Tracking

The use of social sharing widgets is commonplace. But who’s actually tracking interactions with these? Let’s make a count of how many people are clicking these buttons and record a social share rate to see how many readers amplify content on social media.


7 months ago

DoubleClick Floodlight Tags and Google Tag Manager - Lean up Your Containers

Anybody who uses DoubleClick Floodlight knows the slow process of implementing a new tag for each activity for a campaign interaction or conversion. If you’re using Google Tag Manager to add a tag, trigger and maybe some new variables for every new Floodlight – it won’t take long for your container to overfill with almost identical tags. While there’s nothing wrong with this style of implementation, there is another way.


7 months ago

Measuring Content Engagement in Google Analytics - Part 1: Article Completion Rate

It’s time to ditch bounce rates and average time on page in place of meaningful and measurable insights. Enhance how you measure content engagement with these advanced tracking methods to gain real insights into your content and its value against your business objectives.


7 months ago

Drag