How to Track Outbound Link Clicks in WordPress
Every click that leaves your site is invisible to WordPress by default. Here are three ways to record those clicks, and how much of the truth each one actually captures.
On this page
WordPress records nothing at all when a visitor clicks a link that leaves your site. Your analytics log the pageview, the reader clicks through to Amazon, a partner site or your own offer, and that click vanishes. There are three practical ways to get it back: switch on Google Analytics 4 enhanced measurement, send the click through a link on your own domain first, or capture it server side. They are not equally reliable, and the difference is not accuracy of counting so much as how many of the real clicks each method ever sees.
Here is how to set up each one, how to prove it is recording, and how to avoid the trap where your top performing link turns out to be a robot.
What WordPress Counts on Its Own
Your server writes a log line every time someone requests a page from your domain. A click on an outbound link produces no such request. The browser simply navigates away, and the next entry appears in somebody else’s logs.
The destination’s dashboard does not close the gap either. An affiliate network or ad partner shows you their side of the story, usually delayed, often deduplicated by rules you cannot inspect, and never broken down by which of your posts sent the click. If you want to know which paragraph, which button or which review page actually moves people off your site, you have to record the moment they leave.
Method 1: Turn On GA4 Enhanced Measurement
If you already run GA4, this takes about a minute. In Admin, open your web data stream, find Enhanced measurement, and make sure Outbound clicks is enabled. GA4 then fires a click event whenever someone follows a link to another domain, storing the link domain and link URL alongside it, and you can read the results in the Engagement reports.
Two limits matter. Links included in cross-domain measurement do not produce outbound click events, which surprises people running a shop on a second domain. More importantly, this is a browser script, so it only counts visitors whose browser ran it. Ad blockers, privacy browsers, network filters and plain JavaScript errors all remove people from the count without telling you. We covered the size of that hole in why ad blockers break click tracking.
Method 2: Send the Click Through Your Own Domain
Instead of linking straight to the destination, link to a path on your own site, for example /go/coffee-grinder, and have that path redirect to the real URL. The visitor’s browser makes a request to your server, you record it, then you send them on. The whole hop takes milliseconds.
This survives everything the first method does not. There is no script to block, so an ad blocker has nothing to remove, and a fully cached page still produces a real request when the link is clicked. DevDome Redirect Manager works this way and counts clicks per rule, and because the destination lives in one place you can repoint a link across the whole site in one edit. Use a 301 when the destination is permanent and a 302 when you plan to change it, and add rel=“sponsored” on paid or affiliate links so search engines read them correctly. One caution if these are Amazon links: Amazon is stricter than most programs about redirects, so read what Amazon’s link cloaking policy actually allows before you route Amazon URLs through a pretty path.
Method 3: Capture the Click Server Side
The third option keeps your links looking exactly as they do now and records the click on your own server as it happens. DevDome Analytics does this for outbound, buy and redirect clicks, so the count does not depend on a tracking script surviving in the visitor’s browser.
Two extra properties are worth knowing. It is first party, meaning the endpoint sits on your own domain rather than a third-party tracking host that blocklists recognise. And it is cookieless by default, so counting clicks does not set an analytics cookie and does not, by itself, require a cookie banner. For sites that want GDPR-friendly measurement without giving up their click data, that combination is the point.
How to Check It Is Actually Recording
Do not trust a settings toggle. Open a private window, click one tracked link, and confirm it appears in your reports. Then repeat the test with an ad blocker switched on, which is the run that separates the three methods.
Two more checks are worth the five minutes. Load a page that is being served from cache and click the same link, because cached pages are where browser-side tracking quietly stops firing. Then, if you tag campaigns, confirm the click still carries the parameters you expect, using our UTM guide for WordPress as the reference. Run one link through both a browser-side and a server-side counter for a week, and the size of the gap tells you which numbers you have been making decisions on.
Make Sure You Are Counting People, Not Bots
There is a catch with server-side counting: it records everything that touches the link, including crawlers, uptime monitors, security scanners and link preview bots. Complete data and clean data are not the same thing.
The scale is easy to underestimate. On one of our affiliate sites last month, real people made about 9,450 tracked clicks while automated traffic fired a further 4,070 click events, so roughly 3 in 10 raw click events came from bots. Left unsorted, those would have quietly become the baseline for which content converts. DevDome Analytics classifies every hit against six signals before it counts, keeps the human and bot figures side by side, and meters plans on human pageviews only, so machine traffic never eats your allowance. Plan details are on our pricing page.
Which Method Fits Your Site
If you already live in GA4 and your outbound links are a minor detail, enhanced measurement is free and takes a minute, as long as you treat its numbers as a floor rather than a total. If those clicks are how you earn, count them somewhere a blocker cannot reach.
Most sites end up with both: a redirect path for the links that matter commercially, and server-side capture for everything else. What matters is that the number you optimise against is the number of humans who actually left, not the subset that happened to allow a script to run.
Disclosure: DevDome publishes this blog and makes the products it mentions. We describe what they do rather than promise results.
Key takeaways
- WordPress records nothing when someone clicks a link that leaves your site.
- GA4 enhanced measurement counts outbound clicks for free, but only for visitors whose browser runs its script.
- Routing a click through a link on your own domain records it on your server, before anything in the browser can interfere.
- Ad blockers and cached pages are the two usual reasons a browser-side click count comes in low.
- Split human clicks from bot clicks, or your best performing link may turn out to be a crawler.
Sources
- Google Analytics 4: enhanced measurement events — the outbound click event, what it records and when it does not fire
- MDN: Navigator.sendBeacon() — how browser-side analytics try to send a click while the page is unloading
- Google Search Central: qualify your outbound links — rel=sponsored and rel=nofollow for paid and affiliate links
Links last checked August 9, 2026.
Frequently asked questions
Does WordPress track outbound link clicks by default?
No. WordPress logs nothing about a click that sends someone to another site, and neither do most themes. The click happens in the browser and the next request goes to a server you do not control, so unless you record the click yourself, it is simply gone.
Why are my outbound clicks lower than the destination reports?
Browser-based tracking misses anyone whose script did not run, which includes ad blocker users, privacy browsers and people on flaky connections. Cached pages and JavaScript errors add to the gap. A click counted on your own server does not depend on any of that, so it usually lands closer to the destination's number.
Do I need a cookie banner to count outbound clicks?
Not for the counting itself if the tool is cookieless. A click recorded server side without setting an analytics cookie does not need a banner for analytics purposes, which is one reason cookieless setups are popular with GDPR-friendly sites. Anything else on your site that does set cookies is a separate question.
Does a redirect hop hurt SEO or slow the link down?
A first-party redirect resolves in milliseconds and visitors do not notice it. For paid or affiliate links, mark them with rel="sponsored" so search engines understand the relationship, and keep the hop to a single step rather than a chain.