# StackAdapt Reference

## Destination Info

* Supports [Track](https://documentation.freshpaint.io/developer/freshpaint-sdk-reference#track) calls
* Supports [HIPAA mode](https://documentation.freshpaint.io/hipaa-mode)
* Supports forwarding from the [Google Tag Manager Integration](/integrations/google-tag-manager-integration.md)
* Refer to this destination as **StackAdapt** in the [Integrations object](https://documentation.freshpaint.io/reference/developer/freshpaint-sdk-reference#using-the-integrations-object)
* Connection Modes:

<table><thead><tr><th width="249.33333333333331" align="right"> </th><th width="223" data-type="checkbox">Client-side</th><th data-type="checkbox">Server-side</th></tr></thead><tbody><tr><td align="right">Web</td><td>false</td><td>true</td></tr><tr><td align="right">Mobile</td><td>false</td><td>true</td></tr><tr><td align="right">Server</td><td>false</td><td>true</td></tr></tbody></table>

## Retargeting

StackAdapt has extensive support for crafting audiences to retarget. By sending retargeting events to StackAdapt, you can craft campaigns to focus on audiences you know are already interested.

{% hint style="warning" %}
Retargeting Audiences with StackAdapt requires a user's IP Address and User Agent. When used with campaigns and ads that contain specific health information, sending a user's personally identifiable information (PII) for retargeting could be out-of-compliance with HIPAA unless a BAA is signed with StackAdapt. StackAdapt is not currently signing BAAs.
{% endhint %}

Retargeting Audience events require a `retargeting_id` in the same way Conversion Events require a `conversion_id`. The process to set up these events is the same. Following along with the conversion events guide above, we can create a **Transformation** that sends a **constant property** (`retargeting_id`) with the retargeting audience unique ID as the value.

**Example**:

<div data-full-width="false"><figure><img src="/files/vHfcUMmWQE2yrHt0UAW2" alt="" width="356"><figcaption></figcaption></figure></div>

### Server-side

You may provide the following additional event properties when sending events to StackAdapt via Freshpaint's servers:

| **Event property** | **Type** | **Required?**                                                                             | **Description**                                                                                                                                                                                                             |
| ------------------ | -------- | ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `$sapid`           | string   | Required for Click-Through Conversion Events                                              | `sapid` is generated at ad click time and appended to the landing page URL. **Freshpaint will automatically capture sapid for events from your website**. For events from other sources you would need to provide `$sapid`. |
| `conversion_id`    | string   | Required for Conversion Events                                                            | `conversion_id` maps to a Conversion Event in StackAdapt. This uniquely describes the conversion event taking place.                                                                                                        |
| `retargeting_id`   | string   | Required for Retargeting Events                                                           | `retargeting_id` maps to a Retargeting  Audience in StackAdapt. This directly places the user in that Audience.                                                                                                             |
| `$ip`              | string   | Required for Retargeting Events and View-Through Conversion Events                        | Non-hashed public IP address of the browser                                                                                                                                                                                 |
| `$user_agent`      | string   | Required for Retargeting Events                                                           | User agent from the user’s device                                                                                                                                                                                           |
| `value`            | string   | Not required. Recommended for Conversion, Retargeting, and View-Through Conversion Events | Value of the conversion event, if any.                                                                                                                                                                                      |

## Considerations

* Conversions may take up to 2 hours to appear in your StackAdapt portal.


---

# Agent Instructions: 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:

```
GET https://documentation.freshpaint.io/integrations/destinations/demand-side-platforms-dsps/stackadapt/stackadapt-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
