> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hightouch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# StackAdapt

> Syncing data from your warehouse to StackAdapt to enable data-driven advertising decisions and optimized targeting by leveraging comprehensive customer insights.

## Supported syncing

| Sync type | Description | Supported sync modes | API reference |
| - | - | - | - |
| [**CRM Segments**](#syncing-segments) | Sync data from any source to StackAdapt CRM segments | Add | [Segments docs](https://docs.stackadapt.com/graphql/scenarios/crm-audience-creation-with-pii) |
| [**Device Audience**](#syncing-device-audiences) | Sync mobile advertising IDs (MAID / IDFA / GAID) to StackAdapt device audiences | Add | [Segments docs](https://docs.stackadapt.com/graphql/scenarios/crm-audience-creation-with-pii) |
| [**Pixel API**](#syncing-pixel-events) | Sync data from any source to Pixel events | Add | [Pixel API docs](https://docs.stackadapt.com/pixel#http-method) |

For more information about sync modes, refer to the [sync modes](https://docs.hightouch.com/syncs/types-and-modes.md#sync-modes) docs.

## Connect to StackAdapt

Go to the [**Destinations** overview page](https://app.hightouch.com/destinations?from=docs) and click the **Add destination** button. Select **StackAdapt** and click **Continue**. You can then authenticate Hightouch to **StackAdapt** by entering the following StackAdapt tokens:

* **Pixel ID**: (Only necessary for using Pixel API). If you don't have a Pixel ID, create one in StackAdapt.
* **GraphQL API token**: (Required for CRM segment and device audience syncs). If you don't have an API token, please reach out to your account manager.

## Sync configuration

Once you've set up your StackAdapt destination and have a [model](https://docs.hightouch.com/getting-started/concepts.md#models) to pull data from, you can set up your sync configuration to begin syncing data. Go to the [**Syncs** overview page](https://app.hightouch.com/syncs?from=docs) and click the **Add sync** button to begin. Then, select the relevant model and the StackAdapt destination you want to sync to.

### Syncing segments

Sync data from any source to StackAdapt CRM Segments

#### Record matching

You can match rows from your model to segment in StackAdapt on any column in your model and any field in StackAdapt. Ensure the data types of the model column and StackAdapt field you select match.
Refer to the [record matching docs](https://docs.hightouch.com/syncs/record-matching.md) for more information.

StackAdapt accepts the following fields: address, city, email, first name, last name, phone number, state, and zip code. For hashed PII data, you must select one of the following valid combinations of these identifiers:

* email
* first name, last name, email
* first name, last name, phone number
* first name, last name, zip code

If you do not provide at least one of the possible combinations, StackAdapt will be unable to find matches. You can learn more here: [StackAdapt CRM Audience Creation](https://support.stackadapt.com/hc/en-us/articles/360048698853-CRM-Audience-Creation-with-LiveRamp).

> [!TIP]
>
> Increase match rates in StackAdapt by enabling [Match Booster](https://docs.hightouch.com/match-booster/overview.md).

### Syncing device audiences

Sync raw mobile advertising IDs (MAID / IDFA / GAID) to a StackAdapt device audience. StackAdapt does not hash device IDs, so the column you map must contain unhashed identifiers.

#### Sync mode

Choose between sending records in batches via the GraphQL API or uploading a file via a pre-signed URL:

* **Inline API (Default)**: sends added rows from your query results in each run via the GraphQL API.
* **File Upload API**: uploads the device IDs as a file via a pre-signed URL. Recommended for very large audiences.

#### Device ID column

Map a single model column to **Device ID (MAID / IDFA / GAID)**. Rows with missing, empty, or non-string values in this column are skipped and surfaced in the [Live debugger](https://docs.hightouch.com/syncs/debugger.md) as rejected rows.

#### Cross-device targeting

Optionally enable **Cross-device targeting** so StackAdapt extends the audience across related devices for the same user.

#### Advanced

Under **Advanced**, you can override the default batch size. The default is 1,000 rows per batch and the maximum is 10,000. Decreasing the batch size can help if you hit request-size errors.

## Handling PII and hashing

You can sync data to StackAdapt in one of two formats: either as a list of strings containing hashed PII data or as a list of objects containing users' information.

Currently, StackAdapt only supports SHA\_1 as the hashing algorithm. For more information, refer to the [StackAdapt documentation on hashed PII data](https://docs.stackadapt.com/graphql/scenarios/crm-audience-creation-with-pii#option-2-use-hashed-pii-data-and-specify-the-hashing-algorithm).

### Syncing pixel events

Sync data from any source to StackAdapt pixel events

> [!WARNING]
>
> To ensure syncs send each event, your event model must use a truly unique [primary key](https://docs.hightouch.com/getting-started/concepts.md#unique-primary-key-requirement). See the [events syncs](https://docs.hightouch.com/syncs/types-and-modes.md#event-syncs) documentation for more information.

#### Field mapping

Hightouch lets you map model columns to event properties. The required event properties are:

* IP address
* Page title
* User agent
* URL of target website

#### Event args

You can also map additional event data that Hightouch sends to StackAdapt via the args property which can be used for pixel rule matching.

## Tips and troubleshooting

To see the exact API requests and responses from each sync run, use the [live debugger](https://docs.hightouch.com/syncs/debugger.md). To get notified by Slack, PagerDuty, SMS, or email when a sync fails, set up [sync alerts](https://docs.hightouch.com/syncs/alerting.md). If you run into an issue this page doesn't cover, [contact support](#pylon-chat).
