SR
Usage

Outbound Link Tracking

Pro

Track clicks on external links to understand where users go after visiting your site.


Outbound link tracking helps you understand which external resources your visitors find valuable and where they go when leaving your site.

Automatic Tracking

External links are tracked automatically. When a user clicks a link to a different domain, Insights captures:

  • Target URL
  • Target domain
  • Link text
  • Source page URL

Example:

<!-- This click is automatically tracked -->
<a href="https://github.com/example/repo">View on GitHub</a>

Prevent tracking on specific links with the data-insights-no-track attribute:

<!-- This click will NOT be tracked -->
<a href="https://example.com" data-insights-no-track>
    External Link
</a>

Use this for:

  • Advertising links (to avoid inflating metrics)
  • Partner links you don't want to track
  • Navigation to your own external properties

Manual Tracking

Track outbound clicks programmatically:

window.insights.trackOutbound(url, text)

Parameters:

ParameterTypeRequiredDescription
urlstringYesTarget URL
textstringNoLink text (max 255 chars)

Example:

// Track a programmatic redirect
window.insights.trackOutbound('https://partner.com/offer', 'Partner Offer');
window.location.href = 'https://partner.com/offer';

What Gets Tracked

The automatic tracker captures clicks on <a> elements where:

  1. The href points to a different hostname
  2. The protocol is http: or https:
  3. The link doesn't have data-insights-no-track

Tracked:

<a href="https://github.com">GitHub</a>
<a href="http://example.com/page">Example</a>

Not tracked:

<a href="/local-page">Internal Link</a>
<a href="mailto:test@example.com">Email</a>
<a href="tel:+1234567890">Phone</a>
<a href="https://external.com" data-insights-no-track>Excluded</a>

Viewing Outbound Data

Outbound link data appears in:

  1. Dashboard - Outbound Links card shows top clicked domains
  2. Outbound Page - Full list with URLs, domains, and click counts

Use Cases

Identify Valuable Resources

See which external resources your visitors find most useful:

  • Documentation links
  • Partner websites
  • Social media profiles
  • Download sources

Track affiliate link performance:

<a href="https://affiliate.com/product?ref=yoursite"
   data-insights-event="affiliate_click"
   data-insights-category="conversion">
    Buy Now
</a>

Combine with user events for detailed conversion tracking.

Monitor Exit Points

Identify pages where users commonly leave your site to external destinations.


Copyright © 2026 Samuel Reichör