A pageview tells you someone arrived. It doesn’t tell you whether they clicked through to the partner you recommended, or downloaded the PDF guide you spent a week on.
Those happen on a click, and a click that leaves your site or opens a file never loads another page of yours. Pageview counts can’t see it. You need something listening for the click itself.
Google Analytics 4 does this through its enhanced measurement settings, which is why sites leaving it often lose sight of their downloads and outbound clicks. You can get both back in WordPress without it.
How click tracking works
A small script on each page listens for clicks on links. When a link points to another domain, or to a file such as a PDF or ZIP, the script sends a short request to your analytics before the browser follows the link. The request is sent in a way that survives the page unloading, so the visitor isn’t held up and the click isn’t lost when the next page starts loading.
It counts clicks on links on your pages. For a button that runs JavaScript instead of a link, send your own event from that code (more on that below). The numbers are good for comparing one file or destination with another, and for spotting change over time.
Switch it on in Vireo
In the free Vireo Analytics plugin, go to Vireo Analytics, Settings, Tracking, and look under Auto-events. Tick File downloads and Outbound links, then click “Save settings” at the foot of the tab. Both are off by default.
There’s nothing to add to your theme. The same script that counts pageviews starts listening for clicks.
While you’re there, you can tick Form submissions, Email links and Phone links too. Email link clicks record only the domain part of the address, so nobody’s full email address ends up in your stats.
What you’ll see
Clicks show up as events on the Campaigns tab of the Overview, in the Top events card, with a count and the number of unique visitors for the date range.
An outbound click is recorded as outbound, with the other site’s host as its value. A download is recorded as download, with the file name. Click either event to open its own screen, with a daily chart and its top values. That’s where you see which sites people leave for and which files they take.
The default file types are PDF, ZIP, RAR, 7z, the Office formats, CSV, MP3, MP4, MOV, WAV and a few installer types. If you offer something else, such as EPUB files, a developer can extend the list with a filter:
add_filter( 'vireo_auto_event_download_exts', function ( $exts ) {
return $exts . '|epub|mobi';
} );
The hooks reference has the default list. Files hosted on another domain, such as a CDN or cloud storage, count as downloads as long as the address ends in one of those extensions.
The free version groups outbound clicks by site, so 40 clicks to a partner (a made-up number) show as 40 clicks to their domain, without the page on it. It groups downloads by file name, so two files both called guide.pdf in different folders share a row. Distinct file names avoid that.
Track a button or a form step yourself
When the thing you care about isn’t a plain link, send an event from your own code:
vireo('event', 'pricing_toggle', 'yearly');
The second argument is the event’s name, and the optional third is a value that breaks it down. Vireo prints vireo() in the footer along with the tracker, so call it from click handlers or other code that runs once the page has loaded. For something that happens on the server, there’s a PHP function too. The tracker and custom events covers both.
Full destinations and affiliate links in Pro
Vireo Pro handles outbound clicks and downloads with its own tracker, and records the host and path of each click. Its Outbound clicks card lists each destination with the paths clicked under it, and a Top downloads card lists each file.
If you send readers through your own redirect links, such as /go/product-name/ or /recommends/product-name/, Pro counts clicks on them under “Affiliate clicks”. Those links are on your own domain, so a plain outbound tracker would skip them.
Pro also lets you turn an outbound click into a goal, with a pattern like partner.com/ref/*, and give it a value. The goal then shows its completions and conversion rate next to your other goals. See goals and funnels.
While Pro is active, the free Outbound links option is switched off so the same click isn’t counted twice.
Bring your GA4 clicks with you
If GA4 recorded outbound clicks and file downloads for you, Vireo’s Google Analytics import brings them across as the same outbound and download events, by link domain and file name. Your click history then runs through the switch in one chart, instead of starting the day you install. Leaving Google Analytics 4 has the steps and the order to do them in.
For links in newsletters and social posts that bring people to your site, the job is the other way round. UTM links cover that.