> 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](/files/mI46pE2dsj37aJXcnx1V)

* 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 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.abtasty.com/flagship-deprecated/integrations/fe-and-r-segment-integration/segment-integration-receive-traits.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.
