Clickport automatically tracks every click on a link that leaves your site. No manual setup, no data attributes, no code changes. Just install the tracker and outbound link data appears on your dashboard.
The tracker listens for all click events on the page using event delegation. When a visitor clicks an anchor element (<a>), the tracker compares the link's hostname against your site's hostname. If they differ, the click is recorded as an outbound event.
Both hostnames are normalized by stripping the www. prefix before comparison. This means www.example.com and example.com are treated as the same domain.
<a href="https://stripe.com/pricing">
has_clicked set, bounce recalculated
For each outbound click, the tracker sends three pieces of data to the server:
cu): the full URL the visitor is navigating toct): the visible text of the anchor element, trimmed and capped at 200 charactersThe click is stored as an event with the name click in ClickHouse. The destination URL and link text are stored in the event's meta_keys/meta_values arrays as click_url and click_text.
Some sites use internal redirect paths like /go/ to route visitors through an affiliate tracking page before sending them to the external destination. These links technically point to your own domain, so a simple hostname comparison would miss them.
Clickport handles this case. Any link pointing to /go/ or /go on your own domain is treated as an outbound click, even though the hostname matches. If the URL includes an asin query parameter, that value is captured as well.
https://yoursite.com/go/?asin=B09V3KXJPB is tracked as an outbound click with the ASIN B09V3KXJPB attached.
For links that point directly to Amazon (any domain containing "amazon"), the tracker attempts to extract the ASIN from the URL path. It looks for the pattern /dp/XXXXXXXXXX where the ASIN is a 10-character alphanumeric code.
This is useful for affiliate sites that link to Amazon products. The ASIN is stored alongside the click event and can be used as a goal condition for conversion tracking.
Outbound click data appears in two places on your dashboard.
In the Content panel column, the Goals tab has an Outbound sub-tab. This shows all outbound link clicks grouped by destination domain. Each row displays the domain name, total clicks, and unique clicks (distinct sessions).
The API endpoint GET /api/outbound-links returns up to 100 domains sorted by unique clicks. Each result includes an example URL and example link text from that domain.
When you expand a session in the Sessions panel, outbound clicks appear in the event timeline with a green indicator dot. The timeline shows the destination URL so you can see exactly where the visitor went.
Outbound clicks are one of four factors in Clickport's multi-criteria bounce definition. A session is only marked as bounced if all four of these conditions are true:
This means any session with at least one outbound click is automatically not a bounce, regardless of other factors. For affiliate sites where visitors click through to external products, this gives a much more accurate picture of engagement than a simple single-page bounce check.
You can create goals that trigger on outbound link clicks. In the goals configuration, select Click as the goal type and add conditions to match specific clicks.
Available condition fields for click goals:
Each condition supports these operators: equals, contains, starts with, ends with, not contains, not equals, is empty, and is not empty.
When multiple conditions are defined, they use AND logic by default (all conditions must match) or OR logic (any condition can match), depending on your configuration.
Sessions that match a click goal have their has_converted flag set, which feeds into the Conversions and Conv. Rate KPIs. See the Goals docs for full setup instructions.
The outbound click tracker uses document.addEventListener('click', handler, true) with capture mode. This means it intercepts clicks before they propagate, ensuring the event is recorded even if the page navigates away immediately.
The click data is sent using window.clickport.beacon('c', payload), which uses fetch with keepalive: true to ensure delivery even during page unload. The event type 'c' is stored as name = 'click' in the events table.
On the server side, the session manager updates the session's has_clicked flag to 1 on the first click event, then recalculates the bounce status for the session.