# Automation Flow - Segmenting leads from tracked pages

Imagine that you receive leads on your external page and want to add them to a segment in SprintHub. Follow these steps:

* First, you need to set up site tracking. [To learn how to set up tracking, click here](https://docs.sprinthub.com/topicos/configuracoes/rastreamento)
* Next, create a segment. [To learn how to create segments, click here](https://docs.sprinthub.com/topicos/relacionar/segmentos)

Tracked leads will arrive in SprintHub as anonymous leads, containing only location information, IP and UTMs if they exist. To identify them, it is necessary to capture information via WhatsApp (when they click your tracked WhatsApp link) or through a form.

To set up tracking via WhatsApp: To create ready-made or custom forms in SprintHub, click here. To learn more about anonymous leads, click here.

Now, access Automation Flow in the Menu:

<figure><img src="/files/1f674299b1da42afc23a4941ea313db7e8cdcbed" alt=""><figcaption></figcaption></figure>

Next, click "+ New" and add a name.<br>

<figure><img src="/files/4fbd6554a93bb2b5f391a93edf9d57f8043b258b" alt=""><figcaption></figcaption></figure>

Open the builder, click "Start" and add the following blocks:

<figure><img src="/files/3708ba6135ccebabf3f87d14f145cab840132e17" alt=""><figcaption></figcaption></figure>

* Trigger: Visited a page? - This trigger waits for something to happen in the future (when the lead visits the tracked page), to execute the action that will follow.
* Action: Change the lead's segments - In "add segments", select the segment created earlier.

Thus, when the lead visits the tracked page, they will be automatically added to the segment.

Click "Apply" and save. To activate the flow, publish it.

<br>


---

# 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/automation-flows/common-questions/automation-flow-segmenting-leads-from-tracked-pages.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.
