Appearance
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:
| Type | How It Works |
|---|---|
| Masked clicks | Tracked server-side when a visitor follows a masked redirect URL (e.g., yoursite.com/go/slug) |
| Internal clicks | Tracked 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.
How It Works
- 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.
- Click listening — The script monitors all links inside the content area defined by the Content Selector setting.
- Click capture — When a visitor clicks an internal link, the script sends a request to the plugin's tracking endpoint.
- 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.
- 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).
Enabling Internal Click Tracking
- Go to Link Manager Pro → Settings → Tracking.
- Make sure Track Clicks is enabled. This is the master toggle for all click tracking, including internal clicks.
- Toggle Internal Link Click Tracking to on.
- 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. - Click Save Changes.
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:
| Selector | What It Matches |
|---|---|
.entry-content | The default WordPress content wrapper (default) |
article | The <article> element |
.post-content | A custom content wrapper class |
#main-content | An 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 Point | Description |
|---|---|
| Source post | The post or page where the click happened |
| Target URL | The destination URL the internal link points to |
| Anchor text | The visible text of the clicked link |
| IP address | Visitor IP address (anonymized if the setting is enabled) |
| User agent | Browser identification string |
| Referrer | The page the visitor was on when the click occurred |
| Unique | Whether this is the first click for this source post, target URL, and visitor combination |
| Timestamp | When 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.
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.42→192.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
| Setting | Location | Description |
|---|---|---|
| Track Clicks | Settings → Tracking | Master toggle for all click tracking (must be enabled for internal clicks to work) |
| Internal Link Click Tracking | Settings → Tracking | Toggle for internal click tracking |
| Content Selector | Settings → Tracking | CSS selector for the content area the tracker monitors (default: .entry-content) |
Troubleshooting
Clicks Are Not Being Tracked
Work through these checks in order:
- Verify both toggles are enabled. Go to Settings → Tracking and confirm both Track Clicks and Internal Link Click Tracking are on.
- 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. - 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.
- Confirm same-origin. The tracking endpoint rejects requests from other domains. Make sure your page domain matches your WordPress site URL. The check handles
wwwand non-wwwautomatically, but other mismatches (e.g., staging domain vs. production domain) cause rejection. - Check the browser console. Look for JavaScript errors related to the tracker script. A missing or blocked script prevents tracking.
- Check rate limiting. If you are testing rapidly, you may exceed the 30 requests/minute limit. Wait a minute and try again.
- 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.
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.