# Email Marketing - A/B Testing

## Creating an Automation Flow

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

<figure><img src="/files/fe0694790da9457328d31278dad1b7bff799fd24" alt=""><figcaption><p><em>Flow Editing.</em></p></figcaption></figure>

## Toggling Email Sending

When using the block **Toggle**, emails can be distributed among the segment's leads, splitting them into **Group A** and **Group B**. On each execution, the toggle directs the lead to one of the two outputs alternately: first to the first output, then to the second, then again to the first, and so on.

<figure><img src="/files/ad58e9f6269f9c9b405c583dd683a3e06c3b717a" alt=""><figcaption><p><em>Using the toggle block.</em></p></figcaption></figure>

## Checking Lead Behavior&#x20;

After the email send action, you can first add a **trigger** to check if the lead opened the email. If so, they are added to a **segment** or **tag**, allowing the number of opens to be counted.

Then, it is possible to check if 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**, enabling efficient quantification and comparison of the two tests.

<figure><img src="/files/a26dd0642b3822657e309637adad13e16ebe480d" 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. Additionally, using the [Reports](/en/topics/analyze/custom-reports-and-dashboards.md)function, it is feasible to generate custom charts and dashboards, providing a clear visualization of results and assisting in strategic decision-making based on the tests performed.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sprinthub.com/en/topics/relate/email/email-marketing-a-b-tests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
