How Click Tracking Works
Click tracking works by automatically rewriting all eligible links in your HTML emails to redirect through AhaSend’s tracking servers. When a recipient clicks a tracked link, they’re briefly redirected through AhaSend’s servers before being sent to the original destination, allowing the click to be recorded.The Tracking Process
The Tracking Process
- Link Detection: AhaSend scans HTML emails for eligible links
- URL Rewriting: Original URLs are replaced with AhaSend tracking URLs
- Email Delivery: Email is delivered with rewritten tracking links
- Link Clicked: Recipient clicks on a link in the email
- Redirect & Track: AhaSend records the click and redirects to original URL
- Analytics Updated: Click data appears in your dashboard and webhooks
Link Requirements
Link Requirements
Eligible links must be:
- Wrapped in HTML
<a>tags withhrefattribute - Use
http://orhttps://protocol - Properly formatted with quoted URLs
- No spaces around the
=in href attribute
<a href="https://example.com">Click here</a><a href="http://www.example.com/page">Visit page</a><a target="_blank" href="https://example.com">Open in new tab</a>
Common Accuracy Issues
Links Not Tracked
Links Not Tracked
Common causes of untracked clicks:
- Links missing
http://orhttps://protocol - Malformed HTML anchor tags
- Links embedded in custom template variables
- Plain text emails (tracking requires HTML)
- Links with
data-as-no-trackattribute
Invalid Link Formats
Invalid Link Formats
These formats will NOT be tracked:
<a href="example.com">Link</a>(missing protocol)<a href="www.example.com">Link</a>(missing protocol)<a href= "https://example.com">Link</a>(space before quote)<a href = "https://example.com">Link</a>(spaces around =)<a href="{{ url_variable }}">Link</a>(custom variable only)
Email Client Variations
Email Client Variations
Click behavior varies by client:
- Some clients pre-fetch links, inflating click counts
- Mobile clients may handle redirects differently
- Corporate firewalls may block tracking redirects
- Email security scanners may trigger false clicks
Privacy Considerations
Click tracking has significant privacy implications that you should consider:Privacy Impact
Information Collected
Information Collected
When someone clicks a tracked link, AhaSend may collect:
- Timestamp: When the link was clicked
- IP Address: Recipient’s approximate location
- User Agent: Browser and device information
- Original URL: The destination they were trying to reach
- Click Count: How many times the link was clicked
Recipient Awareness
Recipient Awareness
Recipients may notice:
- Brief redirect through AhaSend’s tracking domain
- Different URL in browser address bar during redirect
- Slight delay before reaching final destination
- That their clicks are being tracked
- What information is being collected
- Analytics and reporting data
Opt-out Considerations
Opt-out Considerations
Recipients can avoid tracking by:
- Disabling JavaScript in their browser
- Using privacy-focused browsers or extensions
- Reading emails in plain text mode
- Manually copying/pasting URLs instead of clicking
Enabling Click Tracking
Click tracking can be controlled at different levels depending on how you send emails:Account-Wide Settings
Configure your default click tracking preference in your AhaSend dashboard:- Navigate to Account Settings in your dashboard
- Toggle Click Tracking on or off
- This setting applies to all emails unless overridden per message
Per-Message Override
Override account settings for individual emails using different methods:SMTP with Special Headers
For SMTP email sending, use theahasend-track-clicks header to control tracking:
SMTP Example
Header Details: The
ahasend-track-clicks header accepts true or false values and overrides your account-wide click tracking setting for individual emails.API v2 Implementation
API v2 (/v2/accounts/{account_id}/messages) provides native support for tracking configuration:
API v2 Example
API v2 Advantage: API v2 provides dedicated
tracking field at the root level, making it easier to manage tracking settings without dealing with custom headers.API v1 Implementation
For API v1 (/v1/email/send), include tracking headers in the content.headers field:
API v1 Example
Excluding Individual Links
To exclude specific links from click tracking while keeping it enabled for the email, add thedata-as-no-track attribute:
HTML Example
Best Practices
Link Formatting
Link Formatting
Ensure proper link structure:
- Always include
http://orhttps://protocol - Use proper HTML anchor tag formatting
- Avoid spaces in href attribute formatting
- Test links across different email clients
- Use absolute URLs rather than relative paths
Privacy and Compliance
Privacy and Compliance
Respect recipient privacy:
- Disclose click tracking in your privacy policy
- Consider providing opt-out mechanisms
- Comply with GDPR, CCPA, and other privacy regulations
- Be transparent about data collection purposes
Link Strategy
Link Strategy
Optimize link placement and content:
- Use clear, descriptive link text
- Place important links prominently in email content
- Avoid too many tracked links in a single email
- Use
data-as-no-trackfor administrative links - Test link functionality before sending campaigns
Data Analysis
Data Analysis
Analyze click data effectively:
- Focus on engagement trends over time
- Compare click performance between campaigns
- Segment data by recipient characteristics
- Use A/B testing to optimize link placement and content

