> 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).

# 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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.sprinthub.com/en/topics/relate/automation-flows/common-questions/automation-flow-segmenting-leads-from-tracked-pages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
