> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/relate/email/email-marketing-a-b-tests.md).

# Email Marketing - A/B Tests

Find out which emails generate the most engagement with A/B tests, analyzing open and click rates.

## Creating an Automation Flow

In this example, a [automation flow](https://docs.sprinthub.com/en/topics/general/tasks/automation-flows.md) for a [segment](https://docs.sprinthub.com/en/topics/relate/segments.md) with a significant sample of leads, being executed automatically once for each lead in the segment.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FRxTzfynBkDYoGIwnbZtT%2Fimage.png?alt=media&amp;token=aa05ff87-c6e0-4aeb-b707-990e81ecdff1" alt=""><figcaption><p><em>Flow Editing.</em></p></figcaption></figure>

## Alternating Email Sending

When using the block **Switcher**, emails can be distributed among the leads in the segment, dividing them into **Group A** and **Group B**. On each run, the switch directs the lead to one of the two outputs alternately: first to the first output, then to the second, then back to the first, and so on.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FEX1koSG2e7k4w1JPfHeJ%2Fimage.png?alt=media&amp;token=259b33b3-ddcb-44f8-b158-39a37f353102" alt=""><figcaption><p><em>Using the switch block.</em></p></figcaption></figure>

## Checking Lead Behavior&#x20;

After the email sending action, you can first add a **trigger** to check whether the lead opened the email. If so, it is added to a **segment** or **tag**, allowing you to count the number of opens.

Next, it is possible to check whether the lead interacted with the email, using a **trigger** that identifies when they click a link within it. If there is interaction, the lead is also added to a **segment** or **tag**, making it possible to quantify and compare the two tests efficiently.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FyNeXswRhJyaEhqNU8Tpu%2Fimage.png?alt=media&amp;token=5de071a9-f0c8-45ac-a32b-3f550d4d8fdb" alt=""><figcaption><p><em>Triggers and actions to quantify interactions.</em></p></figcaption></figure>

## Conclusion

With this segmentation, it is possible to analyze the difference between open and click rates by observing the number of leads in each segment. In addition, using the function of [Reports](https://docs.sprinthub.com/en/topics/analyze/custom-reports-and-dashboards.md), it is possible to generate custom charts and dashboards, providing a clear view of the results and helping with strategic decision-making based on the tests performed.
