Outbound Link Tracking
Tracking outbound link clicks count towards your billable monthly page views.
Adding Outbound Link Tracking
Tracking outbound link clicks requires adding the
pirsch-extended.js script to your website. If you have the regular
pirsch-events.js scripts installed, tracking page views and events, you need to replace them with the extended script. The extended script combines the functionality of the other scripts, including tracking file downloads and 404 error pages.
Navigate to the settings page on the dashboard and select the Integration tab. Copy the code snippet for your domain and add it to the
head section of each page you want to track outbound links on. Here is a simple example on what it will look like. You can use the advanced options on the settings page to customize the snippet.
The script will also track file downloads by default. If you don't want this behaviour, you can disable it by adding the
Analyzing Outbound Link Clicks on Your Dashboard
External link clicks will be tracked as events on your dashboard. By default, they will be displayed as Outbound Link Click, but you can change that by setting the
data-outbound-link-event-name parameter. Expanding the event will reveal the external links that have been clicked by your visitors.
Click an entry in the details view to filter the dashboard. The Event Pages panel lists all pages the link has been clicked on.
You can ignore individual links by setting either the
pirsch-ignore HTML parameter or
pirsch-ignore CSS class. Clicking the links below won't trigger an outbound link event.
<a href="https://example.com" pirsch-ignore>Outbound Links</a> <a href="https://example.com" class="pirsch-ignore">Outbound Links</a>