Warning: Use of undefined constant isMobile - assumed 'isMobile' (this will throw an Error in a future version of PHP) in /home/customer/www/3whitehats.co.nz/public_html/wp-content/themes/3wh/templates/content-single-knowledge.php on line 103
Measuring Content Engagement in Google Analytics – Part 3: Social Site Exits
Social Exit Tracking
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:
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 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.
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.