Why Aren't My Outbound Links Being Tracked? A Troubleshooting Guide
Content
If you've set up MonsterInsights to track outbound links but the data isn't showing up in your Google Analytics reports, you're not alone. This is a common issue with a variety of potential causes. This guide will walk you through the most frequent reasons outbound link tracking fails and how to resolve them.
Common Causes for Outbound Link Tracking Issues
1. Links to Subdomains
By design, MonsterInsights does not track links to different subdomains (e.g., from yourdomain.com to shop.yourdomain.com) as outbound links. The plugin's logic considers these to be internal links. If you use separate Google Analytics UA codes for each subdomain, this tracking gap can be significant. A workaround mentioned by users is to use Google Tag Manager to manually set up this specific tracking.
2. Protocol-Relative URLs
Links that start with // instead of http:// or https:// (known as protocol-relative URLs) are a known cause of tracking failure. The plugin's PHP-based parsing system may not recognize these URLs as valid outbound links and will not add the necessary onclick tracking code. The solution is to edit these links to include the full protocol (https://).
3. Links in Page Builders or Theme Templates
The plugin automatically adds tracking to links located in standard content areas like post content, widgets, comments, and navigation. However, links hardcoded into your theme's template files or within certain page builder elements (like Visual Composer) may not be processed. If the tracking code isn't injected, the clicks won't be recorded. Some users have reported success by ensuring the elements are in a widget or the main content area, while others have resorted to using Google Tag Manager for more comprehensive coverage.
4. Incorrect Path Configuration
The "Set path for internal links to track as outbound links:" setting in the MonsterInsights Advanced tab is powerful but must be configured correctly. For example, if you use a plugin that creates links with a /go/ slug, you must enter /go/ exactly into this field. If the path is mistyped or does not match the link structure on your site, the tracking will not work.
5. JavaScript Conflicts or Redirects
If another plugin or script (e.g., a link cloaking plugin) intercepts a click and performs a redirect before the MonsterInsights tracking code can fire, the event will not be recorded in Google Analytics. The order of operations is critical: the tracking code must execute before any redirect occurs.
How to Troubleshoot
- Inspect the Link: Right-click on the problematic link and select "Inspect" (or "View Page Source"). Look for the
onclickattribute. If you see__gaTrackeror similar in the onclick value, the tracking code is present. If it's missing, the plugin did not recognize the link. - Check Your Settings: Double-check the path setting for internal-as-outbound links. Ensure outbound link tracking is enabled in the MonsterInsights settings.
- Test a Standard Link: Create a regular text link in the WordPress post editor to an external domain like
https://example.com. If this tracks correctly, it confirms the issue is isolated to links with specific attributes (like missing protocols) or in specific locations (like theme templates). - Review Your GA Real-Time Reports: Use the Real-Time > Events report in Google Analytics to test clicks immediately. This helps rule out data processing delays.
Understanding these common pitfalls should help you diagnose and fix most outbound link tracking issues with the MonsterInsights plugin.
Related Support Threads Support
-
Purchases tracking on the external websitehttps://wordpress.org/support/topic/purchases-tracking-on-the-external-website/
-
Internal link trackinghttps://wordpress.org/support/topic/internal-link-tracking/
-
How can I track anchor link clicks?https://wordpress.org/support/topic/how-can-i-track-anchor-link-clicks/
-
How to track outlinks to different subdomain of blog domainhttps://wordpress.org/support/topic/how-to-track-outlinks-to-different-subdomain-of-blog-domain/
-
Outgoing links to subdomain not measured as eventhttps://wordpress.org/support/topic/outgoing-links-to-subdomain-not-measured-as-event/
-
event tracking of outbound linkshttps://wordpress.org/support/topic/event-tracking-of-outbound-links/
-
track outbound links but different code for each linkhttps://wordpress.org/support/topic/track-outbound-links-but-different-code-for-each-link/
-
Track #anchorhttps://wordpress.org/support/topic/track-anchor/
-
Track outbound links inside Visual composer elementshttps://wordpress.org/support/topic/track-outbound-links-inside-visual-composer-elements/
-
External link in Top Posts / Pageshttps://wordpress.org/support/topic/external-link-in-top-posts-pages/
-
How to track click event?https://wordpress.org/support/topic/how-to-track-click-event/
-
Cross-Domain Linking If Destination is an IP Addresshttps://wordpress.org/support/topic/cross-domain-linking-if-destination-is-an-ip-address/
-
[Bug] Prefixed domain set as internal link typehttps://wordpress.org/support/topic/bug-prefixed-domain-set-as-internal-link-type/
-
Traking anchor link activity?https://wordpress.org/support/topic/traking-anchor-link-activity-2/
-
[Noob Question]How to track pages visited by different visit links?https://wordpress.org/support/topic/noob-questionhow-to-track-pages-visited-by-different-visit-links/
-
outbound-article-int not happening at all in WP 4.1.1https://wordpress.org/support/topic/outbound-article-int-not-happening-at-all-in-wp-411/
-
Tracking ALL outbound clickshttps://wordpress.org/support/topic/tracking-all-outbound-clicks/
-
how add utm-sourcehttps://wordpress.org/support/topic/how-add-utm-source/
-
Outbound links without http not being trackedhttps://wordpress.org/support/topic/outbound-links-without-http-not-being-tracked/
-
Can I use this to track my internal (company) blog?https://wordpress.org/support/topic/can-i-use-this-to-track-my-internal-company-blog/
-
How to track hastag anchor clicks like #aboutushttps://wordpress.org/support/topic/how-to-track-hastag-anchor-clicks-like-aboutus/
-
External links with target="_blank"https://wordpress.org/support/topic/external-links-with-target_blank/
-
Outbound links from the theme templateshttps://wordpress.org/support/topic/outbound-links-from-the-theme-templates/