Email Open & Click Tracking
Email Open & Click Tracking
NurtureHub automatically tracks email opens and link clicks for every email sent through the platform. Engagement data is recorded in real time, fed into each contact's intent score, and can trigger hot lead alerts — with no configuration required from the agent.
How It Works
Open Tracking
A transparent 1×1 pixel image is embedded in every outgoing email. When the recipient's email client loads the image, it makes a GET request to:
GET /api/track/open/[token]
The token is a unique, per-email identifier that maps back to the contact, the email, and the nurture sequence. On each valid request:
- The event is written to the
email_eventstable. - An Inngest background job is triggered to recalculate the contact's intent score.
Unique vs total opens: The first open for a given contact/email combination is flagged as a unique open. All subsequent opens increment the total open count but are stored as non-unique events.
Click Tracking
All links within outgoing emails are automatically rewritten to route through a server-side redirect endpoint:
GET /api/track/click/[token]
On click:
- The event is written to the
email_eventstable with the destination URL and attribution metadata. - An Inngest event fires to update the contact's intent score.
- The contact is immediately redirected to the original destination URL.
Click tracking captures both unique clicks (first click on a given link per contact) and total clicks.
Bot Filtering
Email security gateways, inbox previewing services, and link prefetchers can generate false open and click events. NurtureHub applies server-side heuristics at both tracking endpoints to detect and discard these requests before they are written to email_events.
Filtered events:
- Are not written to the
email_eventstable. - Do not trigger intent score updates.
- Do not count towards unique or total open/click figures.
Bot detection heuristics include user-agent matching against known scanner signatures and request pattern analysis.
Attribution Metadata
Every event stored in email_events includes UTM-equivalent metadata for attribution purposes:
| Field | Description |
|---|---|
source | The sending platform (e.g. nurturehub) |
medium | Always email for nurture sequence sends |
campaign | The nurture sequence name or ID |
email_position | The position of the email within the sequence (1, 2, or 3) |
contact_category | The contact's assigned category (e.g. seller, landlord) |
This metadata enables per-campaign and per-sequence engagement reporting.
The email_events Table
All tracking events are persisted to the email_events table. Each row represents a single open or click event.
Key Columns
| Column | Type | Description |
|---|---|---|
id | uuid | Primary key |
token | text | Unique tracking token linking the event to a sent email |
event_type | enum | open or click |
is_unique | boolean | true if this is the first event of this type for this contact/email pair |
occurred_at | timestamptz | Server-side timestamp of the event |
destination_url | text | For click events: the original destination URL |
metadata | jsonb | UTM-equivalent attribution fields |
bot_filtered | boolean | true if the event was detected as bot traffic (not written to main events) |
Intent Score Integration
Open and click events are primary input signals to the intent scoring engine. Every valid (non-bot) event fires an Inngest background job that:
- Retrieves the contact's current intent score.
- Applies a weighted delta based on event type (clicks carry more weight than opens) and recency.
- Persists the updated score.
- Evaluates whether the new score crosses the hot lead threshold for the contact's category.
- If the threshold is crossed, a hot lead alert is dispatched to the assigned agent.
This happens asynchronously and typically completes within seconds of the tracking request being received.
Tracking Endpoint Reference
GET /api/track/open/[token]
Returns a 1×1 transparent GIF. Called automatically by the recipient's email client when the email is rendered.
| Parameter | Location | Description |
|---|---|---|
token | Path | Unique per-email tracking token |
Response: 200 OK with Content-Type: image/gif (1×1 transparent pixel).
Invalid or expired tokens return a 200 OK with the pixel image regardless — errors are logged server-side but the response is kept neutral to avoid broken image indicators in the email client.
GET /api/track/click/[token]
Records the click event and redirects the contact to the original URL.
| Parameter | Location | Description |
|---|---|---|
token | Path | Unique per-link tracking token |
Response: 302 Found redirect to the original destination URL.
If the token is invalid or the destination URL cannot be resolved, the endpoint redirects to the NurtureHub base URL to avoid dead links.
Privacy & Compliance
- Open tracking relies on image loading and can be blocked by email clients that disable remote images (e.g. Apple Mail Privacy Protection). In such cases, opens may be under-reported.
- Click tracking is not affected by image-blocking settings.
- Tracking tokens contain no personally identifiable information. The mapping between a token and a contact is stored only server-side.
- All tracking data is stored within the NurtureHub platform and is not shared with third parties.