# Link Tracking

> Learn how to track and analyze link clicks in your broadcast emails with detailed analytics including geographic data and click patterns.

Source: https://sendbroadcast.net/docs/link-tracking

Link tracking allows you to monitor which links your subscribers click in your emails. This feature provides detailed analytics including click counts, geographic data, and engagement patterns.

## How Link Tracking Works

When you enable click tracking on broadcasts or sequences, Broadcast automatically rewrites all links in your email to pass through a tracking system. Here's what happens:

1. **Link Rewriting**: When the email is sent, all `` links are rewritten to use tracking URLs 2. **Click Recording**: When a recipient clicks a link, Broadcast records the click with full metadata 3. **Redirect**: The recipient is immediately redirected to the original destination URL (HTTP 301 redirect) For example, a link like `https://example.com/page` becomes:
```
https://your-broadcast-domain.com/link/[unique-id]?id=[email-id]
```

 ## Which Links Are Rewritten When **Track clicks** is enabled, this is the expected behavior for each kind of link in your email: | Link | Tracked? | Notes | |------|----------|-------| | Standard links in the email body (`https://...`, `http://...`) | Yes | Rewritten to a tracking URL | | Personalized links (e.g. `https://example.com/{{ subscriber.custom_data.token }}`) | Yes | Liquid variables are rendered per subscriber first, then the resulting URL is rewritten | | Links without a protocol (`example.com`) | Yes | `https://` is prepended, then the URL is rewritten | | Links in the email footer | Yes | The channel footer (or the email server's custom footer) is tracked the same way as the body | | The unsubscribe link (`{{ unsubscribe_url }}`) | No | Always sent as a direct link, so unsubscribing never depends on the tracking redirect | | The Postmark unsubscribe tag (`{{{ pm:unsubscribe }}}`) | No | Passed through untouched for Postmark to substitute | | `mailto:` and `tel:` links in the footer | No | Non-web links cannot pass through an HTTPS redirect | | Anchor links (`#section`) | No | In-page references, not destinations | | Image sources (``) | No | Only anchor (``) links are rewritten | Note Each unique destination URL gets its own tracking entry. Personalized links produce one entry per subscriber, since each rendered URL is different. ### Broadcast Tracking vs. Provider Tracking Some email providers (Mailgun, Postmark, SendGrid) offer their own click tracking, which rewrites links a second time through the provider's domain. When **Track clicks** is enabled, Broadcast also signals the provider to enable its tracking, so links may be wrapped twice. If you want links to show only your Broadcast tracking domain, disable click tracking on the provider side, for example, in Mailgun's domain settings, or with custom headers such as `X-Mailgun-Track-Clicks: no`. Broadcast's own tracking and analytics work either way. ## Accessing Link Tracking To access link tracking analytics, navigate to **Analytics** in the sidebar: ![Link Tracking page showing click analytics overview](https://sendbroadcast.net/assets/docs/link-tracking/link-tracking-index-292a3f18.png) The Link Tracking page displays aggregate statistics for all tracked links across the channel. ## Key Metrics The sidebar shows summary statistics: - **Total Links Clicked**: Number of unique URLs that received at least one click - **Total Clicks**: Aggregate count of all link click events - **Avg Clicks per Link**: Average number of clicks per tracked link ## Enabling Link Tracking Link tracking must be enabled when creating or editing broadcasts and sequences. ### For Broadcasts 1. Create or edit a broadcast 2. Go to the **Settings** tab 3. Enable **Track clicks** in the Tracking Options section 4. All links in the email body will automatically be tracked ![Broadcast settings showing Track clicks option](https://sendbroadcast.net/assets/docs/email-metrics/broadcast-tracking-settings-215d283b.png) ### For Sequences 1. Edit your sequence settings 2. Enable **Track clicks** at the sequence level 3. All emails in the sequence will have link tracking enabled ## Click Data Captured When a recipient clicks a tracked link, Broadcast records: | Data | Description | |------|-------------| | **Timestamp** | When the click occurred | | **Subscriber** | Who clicked the link (via email identifier) | | **Link URL** | The original destination URL | | **IP Address** | The clicker's IP address | | **User Agent** | Browser and device information | | **Referrer** | HTTP referrer header (where the click originated) | | **Geographic Data** | Country, region, and city (via IP geolocation) | ### Geographic Data Broadcast automatically geocodes IP addresses to provide location insights: - **Country**: The clicker's country - **Region**: State or region within the country - **City**: City-level location when available Geolocation is performed asynchronously using free IP geolocation services and does not delay the redirect. ## Per-Broadcast Link Analytics Each broadcast with click tracking enabled shows link performance on its detail page: 1. Navigate to the broadcast detail page 2. Scroll to the **Link Performance** section 3. View which links were clicked and their click counts The broadcast detail page also shows: - **Click Rate**: Percentage of recipients who clicked any link - **Total Clicks**: Number of click events for this broadcast ## Link Details View Click on any link in the tracking table to see detailed analytics: - **Total Clicks**: All click events for this link - **Unique Clicks**: Number of distinct recipients who clicked - **Click Timeline**: Chart showing clicks over time (24h, 7d, 30d, 90d, all) - **Geographic Breakdown**: Top countries and cities by click count - **Click History**: Full list of individual clicks with timestamps ## Use Cases ### Measuring Content Engagement - Identify which topics resonate with your audience - Track which calls-to-action perform best - Measure interest in specific products or features ### Optimizing Email Content - A/B test different link placements - Compare button clicks vs text link clicks - Refine your content based on engagement data ### Understanding Your Audience - See geographic distribution of engaged subscribers - Identify peak engagement times by analyzing click timestamps - Track engagement patterns over time with timeline charts ## Technical Details ### URL Handling - Links without a protocol (e.g., `example.com`) automatically get `https://` prepended - Anchor links (`#section`) are not tracked - Empty or blank links are skipped - Links are deduplicated to avoid creating multiple tracking entries for the same URL - Footer links follow the same rules, except the unsubscribe link, the Postmark unsubscribe tag, and non-web links (`mailto:`, `tel:`), which are never rewritten (see the table above) ### Link Redirect Records Each unique URL in your emails creates a `LinkRedirect` record with: - A unique UUID identifier used in tracking URLs - The original destination URL - Association with your broadcast channel ### Performance - Click tracking adds minimal latency (< 100ms) to the redirect - Geolocation happens asynchronously after the redirect - All tracking data is indexed for fast analytics queries ## Privacy Considerations Link tracking involves redirecting clicks through Broadcast's tracking servers. Consider: - **Transparency**: Inform subscribers that click tracking is enabled in your privacy policy - **Email Scanners**: Some email clients or security tools may pre-click links for safety scanning, which can inflate click counts - **Bot Traffic**: Automated systems may click links, particularly in corporate environments with security scanning - **IP Geolocation**: Geographic data is derived from IP addresses, which may not always be accurate (e.g., VPN users) ## Best Practices 1. **Enable tracking strategically**: Only track clicks when you need the analytics data to reduce processing overhead 2. **Monitor for anomalies**: Watch for unusual click patterns that might indicate bot traffic or security scanning 3. **Use alongside open tracking**: Combine click data with open rates for complete engagement analysis 4. **Review regularly**: Check link performance to optimize future campaigns 5. **Deduplicate metrics**: When analyzing click rates, consider using unique clicks rather than total clicks to account for recipients who click multiple times ## Troubleshooting ### Clicks Not Appearing If clicks aren't being recorded: 1. Verify **Track clicks** is enabled for the broadcast/sequence 2. Check that the email has been sent (drafts don't track clicks) 3. Ensure the tracking URL format is correct in the email source ### Inflated Click Counts High click counts compared to open rates may indicate: - Security software pre-scanning links - Bot traffic from email security tools - Recipients clicking links multiple times Use unique click counts instead of total clicks for more accurate engagement metrics.
