> 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/automation-flows/common-questions/automation-flow-segmenting-leads-from-tracked-pages.md). Agents can also search and read this documentation through its [MCP server](https://docs.sprinthub.com/~gitbook/mcp).

# 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 step-by-step instructions:

* First, you need to set up website tracking. [To learn how to set up tracking, click here](https://docs.sprinthub.com/topicos/configuracoes/rastreamento)
* Then 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, IP, and UTMs information if they exist. To identify them, it is necessary to collect information through WhatsApp (when they click the tracked link to your WhatsApp) 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 the Automation Flow in the Menu:

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FxvfhXE5n5Qwc6wMiqOTr%2Fflu1.png?alt=media&amp;token=9eba99ab-3367-483b-abfa-68a5f4cdde4c" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FLSqU9DDfpthWYkfVwBzl%2Fflu2.png?alt=media&amp;token=6fd25591-ec84-410c-92d8-524de252a2b1" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FQFGHb8EnGp7qAYDsfLVh%2Fflu3.png?alt=media&amp;token=a449f295-d04c-4184-9abc-f1ac4da91560" 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 perform the next action.
* Action: Change the lead's segments - Under "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 it. To activate the flow, publish it.

<br>
