> For the complete documentation index, see [llms.txt](https://docs.abtasty.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.abtasty.com/flagship-deprecated/integrations/fe-and-r-segment-integration/segment-integration-receive-traits.md).

# \[FE\&R] Importing Segment.io traits on AB Tasty

{% hint style="warning" %}
Flagship Visitor ID & Segment.io User ID

For the user matching to be achieved (and thus let Flagship target your Segment traits) the User ID sent in the Segment .identify calls must be the same value than the Flagship Visitor ID sent to the decision API.

Segment documentation on User ID [here](https://segment.com/docs/connections/spec/identify/#user-id).
{% endhint %}

## Segment Integration (receive traits)

Segment is a customer data platform (CDP) that helps you collect, clean, and control your customer data.

With Segment, you can easily manage data and integrations with services across your Growth, Product, and Marketing stack. By tracking events and users via Segment’s API and libraries, you can send your product’s data to all of your analytics/marketing platforms, with minimal instrumentation code.

The Segment integration allows you to receive the users traits collected in Segment and to use it to create segments within AB Tasty.

Setting up the Segment integration process is a process taking place on both interfaces.

## Enable the integration on Segment

![Capture\_d\_e\_cran\_2022-06-30\_a\_\_15.00.41.png](https://195542843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPLcJUpntQruhbI1jQ2kr%2Fuploads%2Fgit-blob-03af5081adda6cb5a23d26586e78cc9f5b498347%2F41726130723a62e71c805d52068cc2f3.png?alt=media)

* From the Destinations catalog page in the Segment App, click Add Destination.
* Search for “Flagship.io” in the Destinations Catalog, and select the “Flagship.io” destination.
* Choose which Source should send data to the “Flagship.io” destination.
* To set up the Flagship integration you need to enter your account’s API Key. Copy paste the API Key of your Flagship account in the “Flagship.io” destination settings in Segment. (documentation on [API Keys](https://docs.abtasty.com/flagship-deprecated/integrations/retrieving-your-third-party-tools-audiences-in-ab-tasty-feature-experimentation-rollouts#h_01fybjx66z0eg4nvdz4saqh74c))

You can also consult the [Segment Documentation](https://segment.com/docs/connections/destinations/catalog/flagshipio/).

Congratulations, the integration is now set up and you can use the Segment traits to target users within Flagship!

For information on how to use the traits, please refer to [this documentation](https://docs.abtasty.com/flagship-deprecated/integrations/retrieving-your-third-party-tools-audiences-in-ab-tasty-feature-experimentation-rollouts#h_01hddvxz8jxsev6vtfsp5n8734).

{% hint style="info" %}
Technical specifications

* Segment sends the traits in real time, i.e. Flagship will receive data each time a .identify or .group call is made.
* The Segment User ID sent in the .identify call must be equal to the Flagship Visitor ID
  {% endhint %}

For global information on how to retrieve audiences, please refer to [this page](https://docs.abtasty.com/flagship-deprecated/integrations/retrieving-your-third-party-tools-audiences-in-ab-tasty-feature-experimentation-rollouts).

**Need additional information?**

Submit your request at <product.feedback@abtasty.com>

Always happy to help!


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.abtasty.com/flagship-deprecated/integrations/fe-and-r-segment-integration/segment-integration-receive-traits.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
