Skip to content

Internal Click Tracking

TL;DR: A lightweight JavaScript tracker logs clicks on regular links within your post content — no masking required. Click data is sent to a REST API endpoint, rate-limited to 30 requests per minute per IP. Only same-origin clicks from your own site are recorded.

Track clicks on internal links within your post content using a lightweight JavaScript tracker.

What Is Internal Click Tracking?

Link Manager Pro tracks two types of clicks:

TypeHow It Works
Masked clicksTracked server-side when a visitor follows a masked redirect URL (e.g., yoursite.com/go/slug)
Internal clicksTracked client-side via JavaScript when a visitor clicks an internal link within post content

Internal click tracking covers links that are not masked redirects — regular <a> tags in your content that point to other pages on your site. The tracker automatically excludes masked redirect links. This gives you visibility into how visitors navigate between your pages.

Internal click tracking overview

How It Works

  1. Script loading — When a visitor views a single post or page, the plugin loads a small JavaScript tracker on the frontend. The tracker only loads on singular views (individual posts and pages) — not on archive pages, search results, or the homepage.
  2. Click listening — The script monitors all links inside the content area defined by the Content Selector setting.
  3. Click capture — When a visitor clicks an internal link, the script sends a request to the plugin's tracking endpoint.
  4. Server validation — The plugin validates the request:
    • Both Track Clicks and Internal Link Click Tracking are enabled.
    • The request comes from your site (same-origin check).
    • The visitor's IP has not exceeded the rate limit (30 requests per minute).
    • The visitor is not filtered by your blocked IP or bot detection rules.
    • The target URL belongs to your domain.
    • The source post is published.
  5. Click recording — The plugin records the click and determines whether it is unique based on the source post, target URL, and visitor identity (cookie or IP address).

Internal click tracking flow diagram

Enabling Internal Click Tracking

  1. Go to Link Manager Pro → Settings → Tracking.
  2. Make sure Track Clicks is enabled. This is the master toggle for all click tracking, including internal clicks.
  3. Toggle Internal Link Click Tracking to on.
  4. Review the Content Selector field. The default selector (.entry-content) targets the main content area in most WordPress themes. Adjust it if your theme uses a different content wrapper.
  5. Click Save Changes.

Internal click tracking settings

Configuring the Content Selector

The Content Selector setting defines which content area the tracker monitors. All links inside the matched container are tracked. This is a standard CSS selector.

Examples:

SelectorWhat It Matches
.entry-contentThe default WordPress content wrapper (default)
articleThe <article> element
.post-contentA custom content wrapper class
#main-contentAn element with the ID main-content

Choose a selector that targets your theme's content wrapper. This avoids tracking clicks in navigation menus, sidebars, or footers.

What Gets Tracked

Each internal click records the following data:

Data PointDescription
Source postThe post or page where the click happened
Target URLThe destination URL the internal link points to
Anchor textThe visible text of the clicked link
IP addressVisitor IP address (anonymized if the setting is enabled)
User agentBrowser identification string
ReferrerThe page the visitor was on when the click occurred
UniqueWhether this is the first click for this source post, target URL, and visitor combination
TimestampWhen the click occurred

Internal clicks do not include country data. If you need country-level reporting, use masked clicks instead.

Viewing Internal Click Data

Internal clicks appear in your analytics alongside masked clicks. You can distinguish them by their click type:

  • Masked — redirect-based clicks on masked links
  • Internal — JavaScript-tracked clicks on internal links

Use the click type filter to isolate internal clicks when reviewing analytics.

Internal clicks in analytics view

Rate Limiting

The internal click tracking endpoint enforces a rate limit of 30 requests per minute per IP address. Requests that exceed this limit are silently accepted but the click is not recorded.

This prevents:

  • Automated scripts from flooding your click data
  • Browser extensions or page reloads from creating excessive records

Privacy

Same-Origin Validation

The endpoint verifies that the request originates from your site. Requests from other domains are rejected. This prevents external sites from submitting fake click data to your endpoint.

The check automatically handles www and non-www variations of your domain — both are treated as the same origin.

IP Anonymization

When Anonymize IPs is enabled in Settings → Tracking, internal click records follow the same anonymization rules as masked clicks:

  • IPv4: the last octet is zeroed (e.g., 192.168.1.42192.168.1.0)
  • IPv6: the last 5 groups are zeroed

Bot and IP Filtering

Internal clicks are subject to the same bot detection and blocked IP rules as masked clicks. If you have configured blocked IPs or custom bot patterns in Settings → Tracking, those filters also apply to internal click tracking.

All Visitors

The tracker records clicks from all visitors, including those who are not logged in to your site.

Settings Reference

SettingLocationDescription
Track ClicksSettings → TrackingMaster toggle for all click tracking (must be enabled for internal clicks to work)
Internal Link Click TrackingSettings → TrackingToggle for internal click tracking
Content SelectorSettings → TrackingCSS selector for the content area the tracker monitors (default: .entry-content)

Troubleshooting

Clicks Are Not Being Tracked

Work through these checks in order:

  1. Verify both toggles are enabled. Go to Settings → Tracking and confirm both Track Clicks and Internal Link Click Tracking are on.
  2. Check the content selector. Open your browser's developer tools, run document.querySelectorAll('your-selector') in the console, and verify it returns the content container you expect. Then check that the container contains the internal links you want tracked.
  3. Confirm you are on a single post or page. The tracker only loads on singular views (individual posts and pages), not on archive pages, category pages, or the homepage.
  4. Confirm same-origin. The tracking endpoint rejects requests from other domains. Make sure your page domain matches your WordPress site URL. The check handles www and non-www automatically, but other mismatches (e.g., staging domain vs. production domain) cause rejection.
  5. Check the browser console. Look for JavaScript errors related to the tracker script. A missing or blocked script prevents tracking.
  6. Check rate limiting. If you are testing rapidly, you may exceed the 30 requests/minute limit. Wait a minute and try again.
  7. Inspect the network tab. Open your browser's developer tools, go to the Network tab, click an internal link, and look for a POST request to the tracking endpoint. Check the response status code.

Troubleshooting internal click tracking

Clicks Show as Non-Unique

A click is unique per combination of source post, target URL, and visitor. If you click the same internal link on the same post, subsequent clicks are recorded but marked as non-unique. Clear your cookies or use a different browser to generate a unique click during testing.