---
url: "https://vueda.dev/v3/reference/api/py/vueda.vdq.tracking/EmailTrackingStrategy.md"
title: "EmailTrackingStrategy"
---

# EmailTrackingStrategy

## Overview

Attach nothing to an email and find no queue item from a tracking event.

``send_email`` matches a tracking event to its queue item by the message ID the ESP returned. A strategy
gives it a second way to match, for an event that arrives before VDQ stored that ID. This base class is the
no-op strategy. Set ``VDQ_EMAIL_TRACKING_STRATEGY`` to it on an ESP that accepts no tracking data, or
subclass it to carry the key another way, such as in a tag.

## `attach` {#attach}

Add tracking data that identifies ``queue_item`` to ``email`` before it is sent.

### Signature {#attach-signature}

`attach(self, email, queue_item)`

#### Parameters {#attach-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| self |  | yes |  |  |
| <span id="attach-param-email">email</span> |  | yes |  |  |
| <span id="attach-param-queue_item">queue_item</span> |  | yes |  |  |

### Source {#attach-source}

`server/vueda/vdq/tracking.py:25`

## `find_queue_item` {#find_queue_item}

Return the queue item that the tracking data on ``event`` identifies, or ``None``.

### Signature {#find_queue_item-signature}

`find_queue_item(self, event)`

#### Parameters {#find_queue_item-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| self |  | yes |  |  |
| <span id="find_queue_item-param-event">event</span> |  | yes |  |  |

#### Returns {#find_queue_item-returns}

`vueda.vdq.models.QueueItem | None`

### Source {#find_queue_item-source}

`server/vueda/vdq/tracking.py:28`

## Source

`server/vueda/vdq/tracking.py:15`
