Skip to content

Clicks on links to your own pages ​

Count clicks between your own pages, see where the total shows, and choose between one running total and a report per link.

Link Manager Pro can track internal link clicks, the clicks on links from one of your posts or pages to another, in two ways:

  • Track clicks on internal links counts them and leaves your links exactly as you wrote them. You get one running total on the Dashboard.
  • Mask internal links turns links to your own pages into short links under the Internal link prefix, like yoursite.com/go/aB3dE9xQ. Each one then gets its own link report.

Both are off on a new site. Use the first for a site-wide count and the second when you need numbers per link.

Two ways to count clicks between your pages ​

Track clicks on internal links counts clicks without changing your links, and gives one total. Mask internal links turns those links into short links, each with its own report.

Track clicks on internal linksMask internal links
Where you turn it onSettings, Tracking tabSettings, General tab
Your linksStay as you wrote themBecome short links when a post is saved or scanned
How a click is countedA small script in the visitor's browser reports itYour server counts it when the short link opens. No script
What you seeOne total, Internal link clicks, on the DashboardA report per link: clicks, unique clicks, countries and the posts the clicks came from
Part of the Dashboard's ClicksNo, counted apartYes, with your other short links
CountryNever recordedRecorded when known
Which linksAny link to your site inside the post text, also relative ones like /about/Most full links (https://...) to your site in posts and pages (which ones)
UndoTurn the switch offTurning it off stops new masking. Links already masked stay short links until you restore them with WP-CLI

Choose Track clicks on internal links when you want to know how much readers move between your pages, without touching your links. Choose short links when you need to know which links get the clicks (Count clicks per link with short links instead).

You turn it on in the Tracking settings, where Click tracking must be on as well. Click tracking is on by default. Only administrators see Settings.

Link Manager › Settings › Tracking
  1. Check that Click tracking is on.
  2. Turn on Track clicks on internal links. The Content selector row appears below it.
  3. Leave Content selector at .entry-content if your theme puts the post text in an element with that class. Many themes do. Otherwise enter your theme's selector (see Which internal link clicks are tracked?).
  4. Select Save changes.

Saving the Tracking tab doesn't clear your page cache. If your site has one, clear it yourself after saving. Until then, visitors may get cached copies of your posts without the tracking script.

To stop, turn Track clicks on internal links off and select Save changes. Clicks already recorded stay until Keep click data for deletes them.

A click is tracked when a visitor clicks a link to your own site inside the post text of a published post or page. The post text is the first element on the page that matches Content selector.

These count:

  • Links to any address on your domain, with or without www., including relative links like /pricing/ and links to files you uploaded.
  • Jump links to a part of the same page, like #step-2, for example in a table of contents inside the post.
  • Clicks by every visitor who isn't left out below, including you and other logged-in users.

These don't count:

  • Links outside the Content selector area, such as your menu, sidebar and footer in most themes.
  • Your own short links, under the Short link prefix, the Internal link prefix or the Affiliate link prefix. They're already counted as clicks on that short link. Links still written with a previous prefix count only on the short link (Details).
  • A link's other address that opens the link. It is counted as a click on that short link.
  • Links with the data-lmp-notrack attribute.
  • Links to other sites, and to subdomains such as shop.yoursite.com.
  • Links on pages that aren't a single post or page: your posts page (the blog index), archives, search results and other post types, such as products. A static front page is a page, so it counts.
  • Links in posts that aren't published, such as drafts, scheduled and private posts, and previews of them. A preview of a published post counts.
  • Bots, Blocked IP addresses, and clicks over the repeat limit (How internal clicks are counted).

Because a script in the browser sends each click, some clicks never arrive:

  • Visitors whose browser runs no JavaScript, or blocks the script or its request, aren't counted.
  • A click, a tap, Enter on a link and Ctrl or Cmd+click count. A middle click, or opening the link from the right-click menu, doesn't.
  • Pages for logged-out visitors carry no security code, so a cached copy of any age still counts. Only logged-in visitors send a code, and their pages aren't cached.

Internal link clicks show in one place: the Internal link clicks row of the All time card on the Dashboard. It's the total of every internal click you still keep, whatever date range you pick.

  • The row counts every internal click, not only unique ones.
  • The row shows only while Click tracking and Track clicks on internal links are both on.
  • The number can be up to 60 seconds old.
  • Internal clicks never count in Clicks, All clicks or any short link report (The All time card).

No screen breaks the total down by post or by link. Link Manager Pro stores each click's details (see Details). They appear only in WordPress's personal data export: a logged-in user's own clicks show there as Link inside a post. For numbers per link, use short links (Count clicks per link with short links instead).

How internal clicks are counted ​

Internal clicks follow the same filters as clicks on short links, with their own repeat limit. The shared rules are explained on How clicks are counted.

  • Bots and blocked addresses: Ignore bots and Blocked IP addresses apply as they do to short links (Which clicks aren't counted?).
  • Repeat limit: one IP address can send 30 clicks per minute from one post, all links in that post together. Later clicks in that minute aren't counted. The visitor still goes to the page.
  • Unique clicks: each internal click is marked unique or not when it's stored, but no screen or export shows that mark. Internal link clicks counts every click.
  • The tracking cookie: internal clicks store its ID only when the visitor already has one from a short link or redirect and has given consent (The tracking cookie and consent). They never set or remove it.
  • Privacy: Anonymize IP addresses shortens the stored address, and Keep click data for deletes old internal clicks along with all other click records (Tracking settings).

Short links pointing to your own pages give you a full report per link. Their clicks are counted on your server, so no script, cache age or blocker gets in the way. You can get them in two ways.

  • Mask internal links, under Link Manager › Settings › General, turns full links to your own pages into short links under the Internal link prefix (go by default). It works when you save a post while Mask links when saving posts is on, and when you run Scan posts. It edits your posts, so read Mask internal links and How do I undo link masking? first. With Affiliate disclosure on, masked links to your own pages can make the disclosure show on posts that link only to your site.
  • One short link by hand, for the few links you care about most. Create a short link whose Destination URL is your page, and use it in your post (Create and edit a short link).

Each click on such a link counts for the short link and for the post it came from. It shows in the link's report, the Dashboard's Clicks and the Posts tab of What’s working. The Internal tab of Short Links lists these links. A visitor goes through one redirect on your site before the page opens.

Check that it works ​

Once Track clicks on internal links is on, the Dashboard's All time card shows Internal link clicks. A click you make yourself counts, so you can test it.

  1. Open a published post on your site, in a browser that runs JavaScript.
  2. Click a link inside the post text that goes to another page on your site and isn't a short link.
  3. Go to Link Manager › Dashboard within a minute or two. Internal link clicks has gone up by one.

If you use your browser's developer tools, the Network tab shows a request to /wp-json/link-manager-pro/v1/track/internal-click when you click. Status 200 means it arrived, not that it was counted: a bot, a blocked address or the repeat limit also get 200. For a logged-out visitor, status 403 means the request didn't come from your domain. A logged-in visitor's expired security code also gives 403.

Details ​

The settings behind this page, with their defaults on every site.

SettingWhereDefaultWhat it does
Click trackingTracking tabOnMust be on. While it's off, nothing is tracked and the Dashboard row is hidden
Track clicks on internal linksTracking tabOffAdds the tracking script to single posts and pages, and records the clicks it sends
Content selectorTracking tab.entry-contentA CSS selector for the area whose links count. Only the first matching element is used. Shows only while the switch above is on
Mask internal linksGeneral tabOffTurns full links to your own pages into short links. On save, works only while Mask links when saving posts is on
Internal link prefixGeneral tabgoThe prefix of those short links. Shows only while Mask internal links is on

How Track clicks on internal links works, for technical readers:

TopicBehavior
Where the script loadsFront-end views of a single post or page (post types post and page), only while both switches are on
How a click is sentnavigator.sendBeacon, a POST to /wp-json/link-manager-pro/v1/track/internal-click with the post ID, the link's full address and its text. The click isn't held back. A browser without sendBeacon sends nothing
Checks on your serverBoth switches on; a valid security code for that post, needed only for logged-in visitors; an Origin or Referer on your domain, www. ignored; the post published; the address on your domain, not one of your short links and not a link's other address that opens its link. A dormant other address (a page, a redirect or the source plugin answers it) stays an internal click
Stored with each clickThe post, the link's full address, the link text (up to 500 characters), the time, the IP address (shortened while Anonymize IP addresses is on), the browser details, the referrer (the post's own address, as the browser sends it), the logged-in user, and the cookie ID only with consent. No country
Repeat limit30 clicks per minute per IP address per post
Unique markStored, shown nowhere. A click is marked unique when no earlier click from that post to that exact address has the same cookie, or the same stored IP address and browser details
Changed prefixYour current prefixes and the previous ones Link Manager Pro still remembers are left out. Links written with an old prefix count only on the short link

To count every link on the page, menus and footer included, enter body as the Content selector.

Get more out of it ​

  • Get full reports for your most important links. Want to know how many readers go from a post to your pricing page? Make a short link to that page and use it in the post. It gets its own report with countries and Recent clicks, and it isn't added to Internal link clicks.
  • Keep jump links out of the total. A table of contents inside the post adds a click for every #section link. Add data-lmp-notrack to those links where you can edit their HTML, such as a Custom HTML block or the classic editor's Text tab. The total then counts moves between pages only.
  • Match the selector to your theme. Right-click your post text in the browser, choose Inspect, and look for the class on the element around it, such as .post-content. Enter it as Content selector. One that matches nothing counts nothing, and no error shows. An invalid one can't be saved in Settings (Enter a valid CSS selector.), and if one is stored anyway, the tracker uses .entry-content.
  • Clear your cache when you turn it on. Saving the Tracking tab doesn't clear it.
  • Pair it with Link Audit. Link Audit shows which posts have too few links pointing to them. Once you add links, Internal link clicks shows whether readers use links between your pages at all.

If something goes wrong ​

  • If the Dashboard has no Internal link clicks row, then check that Click tracking and Track clicks on internal links are both on under Link Manager › Settings › Tracking.
  • If Internal link clicks stays at 0, then check that Content selector matches the element around your post text. Test on a single post or page, with a link that isn't a short link, and clear your page cache.
  • If clicks in your menu or sidebar aren't counted, then that's expected: they're outside Content selector. Enter body to count them, or .entry-content to go back.
  • If the total looks low, then remember what isn't counted: links outside Content selector, middle clicks, browsers without JavaScript or with blockers, bots and clicks over the repeat limit.
  • If you need the clicks per link or per post, then use short links to your pages instead (Count clicks per link with short links instead).

More fixes are on Troubleshooting.