Slimstat Analytics records outbound link clicks in WordPress automatically, with no tag, no trigger and no extra code. Every click on a link pointing off your domain is written to the outbound_resource column of your own database table, and appears in Slimstat’s outbound reports on the Site Analysis screen in wp-admin.
Google Analytics 4 and Google Tag Manager reach the same destination by a longer road: a data stream, a tag, a trigger, a published container, and a request that most ad blockers already recognise. Both routes are covered below.
The four ways to record an outbound click in WordPress
Four methods record outbound clicks on a WordPress site: the Slimstat plugin, GA4 enhanced measurement, a Google Tag Manager trigger, and a self-hosted redirect. The four differ less in what they capture than in who stores the result, and in whether an ad blocker can stop the request from reaching a server at all.
| Method | Setup effort | Where the click data lands | With an ad blocker running |
|---|---|---|---|
| Slimstat Analytics | None; active as soon as the plugin tracks | Your own slim_stats table | Ad-Blocker Bypass transport avoids common blocklists |
| GA4 enhanced measurement | One toggle on the web data stream | Google’s servers | Most blocklists carry gtag.js; blocked clicks are lost |
| Google Tag Manager | Tag, trigger, variable, container publish | Google’s servers, through GA4 | Most blocklists carry the container; blocked clicks are lost |
| Self-hosted redirect | Custom code or a link-cloaking plugin | Your own database or server log | Unaffected; the hit is an ordinary page request |
What Slimstat writes when a visitor clicks away
Slimstat writes the destination URL into outbound_resource, a VARCHAR(2048) column on the slim_stats row for the page the visitor was reading, and stamps dt_out with the moment of the click. Because the click updates that pageview row rather than creating a new one, every outbound URL stays joined to the page that produced it.
A link counts as outbound when its hostname is not the site URL host, the home URL host, or the current HTTP host. Slimstat lowercases each hostname and strips the port and a leading www. first, so www.example.com:443 and example.com count as the same site.
Several external clicks on one page are appended to the same cell, separated by ;;;, until adding the next URL would pass 2048 characters — existing URLs are never truncated to make room. Each click is also written to the slim_events table with its coordinates and the link’s own text, which is the practical difference between event tracking and pageview tracking. The database tables reference documents both tables.
One exception matters before you read a report: an external link whose file extension matches the Downloads list is filed as a download, with content_type set to download, and never appears among outbound links.
Where the outbound reports appear in wp-admin
Two reports carry outbound data on Slimstat’s Site Analysis screen out of the box: Top Outbound Links, which aggregates outbound_resource by count, and the Pages with Outbound Links chart, which plots total clicks against distinct URLs over time. Top Outbound Links also appears in the WordPress dashboard widget when Dashboard Widgets is enabled, and the Access Log marks each pageview that ended in an external click.
A third report, Recent Outbound Links, ships in Inactive Reports rather than on the screen, so drag it onto Site Analysis before you go looking for it. It is the one to open first when you are verifying a fresh setup, because it lists destinations by most recent click rather than by volume.
Outbound Link is also a filter dimension, so any report can be narrowed to visits that ended at one external domain. Two more free routes reach the same column: the shortcode [slimstat f="widget" w="slim_p4_21"] embeds Top Outbound Links in a post, covered in the shortcode examples, and the REST endpoint /wp-json/slimstat/v1/get accepts function=top&dimension=outbound_resource with a token from Settings, Access Control.
The two settings that decide what counts as outbound
Two settings decide what Slimstat files as an outbound link. Downloads, in the Tracker tab’s Link Tracking section, defaults to pdf,doc,xls,zip and diverts matching external files into the download reports. Link Attributes, in the Exclusions tab under Page Properties, defaults to noslimstat,ab-item and suppresses any link whose class, rel or href matches an entry.
The Downloads field is the one that surprises people. A link to a whitepaper PDF on a partner’s domain is an external click by any reasonable definition, but because pdf sits in the default list the click is filed as a download and the outbound reports return nothing for it.
Link Attributes is the opposite tool, removing clicks you do not want counted. Add a CSS class to sponsor badges, or a URL fragment shared by every affiliate link, and those clicks stop being recorded. Keep noslimstat in the list whatever else changes, because Slimstat uses that class on its own interactive report links.
Excluding your own clicks is a separate job, handled by IP, username and role filters rather than by link attributes, as excluding your own visits explains.
Ad blockers are where outbound data usually disappears
Outbound tracking is a client-side click handler in every method here except the redirect, so a blocked request is a lost click rather than a delayed one. Slimstat’s Tracking Request Method setting offers three transports, REST API, Admin-AJAX and Ad-Blocker Bypass, and the third serves the tracker and its endpoint from same-domain paths that block lists do not recognise.
Fallback is always on: if the selected transport fails, Slimstat tries the next automatically, so switching to Ad-Blocker Bypass costs nothing when no blocker is present. The ad-blocker bypass guide walks through the switch, and the tracker troubleshooting guide covers clicks that still fail to appear.
Outbound clicks need the JavaScript tracker even when Tracking Mode is set to Server. Server mode changes how the pageview is recorded, in PHP rather than in the browser, but the handler that captures external links is still JavaScript, and Slimstat enqueues that script in both modes. Server-side tracking setup explains each mode.
Google Tag Manager and GA4, if you are committed to Google
GA4 already records outbound clicks without Tag Manager: enable Enhanced measurement on the web data stream and outbound clicks arrive as a click event carrying link_domain and link_url parameters. Tag Manager is worth the extra work only when you need a custom event name, extra parameters, or one container feeding several destinations.
The Tag Manager route takes six steps: create a Tag of type GA4 Event, add your Measurement ID, name the event outbound_click, set the Trigger to Click, Just Links, add a condition that Click URL does not contain your own domain, then preview and publish the container. Google’s event tracking documentation covers the parameter names, and Analytics Mania has a walkthrough with screenshots.
The trade-off is not setup time, which is an afternoon at most, but that the data sits on Google’s servers under Google’s retention rules and reaches them only from visitors whose browsers allow Google’s scripts to run. The Google Analytics alternative for WordPress page compares the two models, and Slimstat vs MonsterInsights covers the plugin that brings those GA4 reports into wp-admin.
The redirect method, and the one case that justifies it
A redirect route replaces the external href with a local URL such as /go/tool-name, logs the hit server-side, then forwards the visitor to the real destination. The redirect is the only method that survives a visitor with JavaScript disabled, and the only one that requires either custom code or a dedicated link-cloaking plugin to work at all.
The cost is that every link has to be rewritten and maintained, the redirect adds a hop before the visitor arrives, and a cloaked URL hides the destination from anyone hovering over it. Affiliate programmes that already require cloaked links absorb that work anyway, which is where the method pays for itself. For ordinary editorial links the redirect rarely pays.
Mistakes that quietly corrupt outbound data
Five mistakes account for most bad outbound data: counting your own clicks, running two methods at once, forgetting that download extensions are diverted, testing in a browser that blocks the tracker, and never opening the report afterwards. Each has a fix that takes under five minutes.
- Your own clicks are in the data unless you exclude your IP address, username or role, because a logged-in editor checking links produces the same rows a visitor does.
- Two methods run in parallel produce two datasets that disagree, so decide which one is authoritative before comparing them.
- A PDF or ZIP link is missing because its extension sits in the Downloads field, not because tracking failed, so check the download reports first.
- A test click shows nothing when the testing browser runs an ad blocker, so verify in a clean profile before concluding the setup is broken.
- Nobody opens the report after the week it was configured, which wastes the entire setup.
Outbound link tracking FAQs
These answers cover the questions that usually decide the setup: whether a plugin is required, whether JavaScript is, what happens to PDF links, and where the data sits afterwards. Every Slimstat behaviour described below ships in the free plugin on wordpress.org, where Slimstat has been listed since 2010.
Do I need a plugin to track outbound links in WordPress?
No. GA4 enhanced measurement records outbound clicks with a single toggle, and Tag Manager or a redirect route will do it too. A plugin changes where the data lands rather than whether the click is captured: Slimstat writes to your own database table, the Google routes to Google’s servers.
Does Slimstat track outbound links in the free version?
Yes. The outbound_resource column, the Recent Outbound Links and Top Outbound Links reports, the Pages with Outbound Links chart, the shortcode widget and the REST dimension are all free. Heatmaps, email reports and CSV export are Pro features, none of them needed to see outbound clicks.
How do I stop specific links from being tracked?
Add a CSS class, a rel value or a distinctive href fragment to the Link Attributes field in the Exclusions tab, and any link matching an entry stops being recorded. The default list already contains noslimstat, so adding that class to a link exempts it without changing the settings at all.
Can I see which page the outbound click came from?
Yes, because Slimstat stores the outbound URL on the pageview row itself rather than in a separate log keyed only by time. That row already holds the resource the visitor was reading, so the page and the external destination are read together with no session reconstruction.
Does outbound tracking work without JavaScript?
No, unless you use the redirect method. Slimstat’s outbound capture is a click handler in the browser, and that holds in both Client and Server tracking modes, so a visitor with JavaScript disabled generates a pageview in Server mode but no outbound row.