Open Tracking
Handle email open tracking when recipients open emails. This endpoint is used internally by the Posthoot system to track email opens.📝 Endpoint
📋 Query Parameters
The tracking token for the email. This token is embedded in the email HTML as a tracking pixel.
📤 Request Example
📥 Response
Success (200 OK)
Error Responses
Invalid Token (401 Unauthorized)
Missing Token (400 Bad Request)
🔍 How Open Tracking Works
1. Email Generation
When an email is sent, a tracking pixel is automatically embedded:2. Email Opening
When the recipient opens the email:- Email client loads the tracking pixel
- Browser makes a GET request to the tracking URL
- Posthoot records the open event
3. Data Collection
The system automatically collects:- IP Address: Recipient’s IP address
- User Agent: Browser and device information
- Geographic Data: Country, city, region
- Device Information: Device type, browser, OS
- Timestamp: Exact time of open
🛡️ Privacy Considerations
Data Minimization
- Only essential tracking data is collected
- IP addresses are anonymized after processing
- No personal information is stored in tracking tokens
Compliance
- GDPR compliant tracking
- Opt-out mechanisms available
- Clear privacy policy required
Security
- Tracking tokens are cryptographically secure
- Tokens expire after a reasonable time
- Rate limiting prevents abuse
📊 Tracking Data
Geographic Information
- Country: ISO country code (e.g., “US”, “CA”)
- City: City name (e.g., “New York”, “Toronto”)
- Region: State/province (e.g., “NY”, “ON”)
Device Information
- Device Type: “desktop”, “mobile”, “tablet”, “other”
- Browser: “Chrome”, “Safari”, “Firefox”, “Edge”
- OS: “Windows”, “macOS”, “iOS”, “Android”
Timing Information
- Timestamp: ISO 8601 format
- Timezone: Automatically detected from IP
🔧 Implementation Notes
Email Client Compatibility
- Gmail: Blocks tracking pixels by default
- Outlook: May block tracking pixels
- Apple Mail: Blocks tracking pixels in some cases
- Thunderbird: Generally allows tracking pixels
Fallback Tracking
When tracking pixels are blocked, alternative methods are used:- Link tracking (clicks)
- Engagement scoring based on other metrics
- Time-based analysis
Rate Limiting
- Tracking endpoints have rate limits
- Prevents abuse and spam
- Configurable per IP address
📈 Analytics Integration
Real-time Updates
Open events trigger real-time analytics updates:- Campaign open rates
- Geographic breakdowns
- Device statistics
- Engagement scores
Webhook Notifications
Open events can trigger webhooks:🚨 Error Handling
Handle Blocked Tracking
Graceful Degradation
📚 Related Endpoints
- Click Tracking - Handle email click tracking
- Email Analytics - Get email analytics
- Campaign Analytics - Get campaign analytics
- Webhooks - Set up real-time notifications