> 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/adaptivecx/getting-started/activate/integrations/data-connections.md).

# Data Connections

Connect AdaptiveCX to your existing tools and data sources. Export specific data elements to external platforms and custom systems.

<figure><img src="/files/7BdqwvkZIWlM0NOZHjKH" alt=""><figcaption></figcaption></figure>

## What data connections do <a href="#what-data-connections-do" id="what-data-connections-do"></a>

Data connections export specific AdaptiveCX data to external platforms:

* **Audiences** - Send audience membership to marketing platforms
* **Predictions** - Export prediction scores to CDPs
* **Events** - Stream event data to analytics tools
* **Affinities** - Share interest scores with personalization engines
* **Attributes** - Sync visitor data to CRM systems

## Available data elements <a href="#available-data-elements" id="available-data-elements"></a>

When creating an integration, select which data to export:

* **Attribute Categories** - Custom attribute groups
* **Predictions** - Prediction scores for visitors
* **Audiences** - Audience membership data
* **Events** - Tracked events and their parameters
* **Affinities** - Visitor affinity scores
* **Attributes** - Visitor attribute values

## Create a data connection <a href="#create-a-data-connection" id="create-a-data-connection"></a>

{% stepper %}
{% step %}

### **Open Data Connections**

Go to `Activate` > `Integrations` > `Data Connections`.
{% endstep %}

{% step %}

### **Click Create New Integration**

The integration configuration modal opens.

<figure><img src="/files/pv5GzP0zRbjy3xt1ACoB" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### **Select Data Element Type**

<figure><img src="/files/gCuC0b1w29u2DIwR9flx" alt=""><figcaption></figcaption></figure>

Choose which data to integrate:

* Attribute Categories
* Predictions
* Audiences
* Events
* Affinities
* Attributes

Then select the specific data element from the list.&#x20;
{% endstep %}

{% step %}

### &#x20;**Choose Where to Store**

Select the destination for your data:

* External platform
* Custom endpoint
* Data warehouse

Configure the connection details for your destination.
{% endstep %}

{% step %}

### **Enter Key Name**

Provide a key name under which the data will be stored in the external system.

This key identifies the data in your destination system.
{% endstep %}

{% step %}

### **Create Integration**

Click **Create Integration** to activate the connection.&#x20;
{% endstep %}
{% endstepper %}

## Custom JS Code <a href="#custom-js-code" id="custom-js-code"></a>

Add custom JavaScript to trigger adaptive functionality on your site.

### When to use custom code <a href="#when-to-use-custom-code" id="when-to-use-custom-code"></a>

* Integrate with unsupported platforms
* Add custom event handling
* Implement complex personalization logic
* Connect to proprietary systems

### Create custom code <a href="#create-custom-code" id="create-custom-code"></a>

### &#xD; <a href="#create-custom-code" id="create-custom-code"></a>

{% stepper %}
{% step %}

#### Open Custom JS Code

In Data Connections, find the Custom JS Code section and click Create New Custom Code.

<figure><img src="/files/zwHz2rBUjja1WPIMqH3O" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Enter name

Provide a descriptive name for your custom code in the Name field.
{% endstep %}

{% step %}

#### Configure targeting (Who To Target)

Set who should execute this custom code:

* Traffic Source: Target visitors from specific traffic sources
* Device: Target by device type (mobile, desktop, tablet)
* Audience: Target specific audiences

Click **Edit** to configure targeting rules.
{% endstep %}

{% step %}

#### Set when to run (When to Run)

Configure the execution frequency: how often the code runs (e.g., every session, once per visitor)
{% endstep %}

{% step %}

#### Write your JavaScript

In the **Your Custom Code** section, add your JavaScript code.

Use AdaptiveCX APIs within your code to:

* Get prediction scores
* Retrieve visitor attributes
* Check audience membership
* Trigger adaptive features
  {% endstep %}

{% step %}

#### Validate the code

Click **Validate Your JS Code** to check for syntax errors.
{% endstep %}

{% step %}

#### Publish

Click **Publish Code** to activate the custom code on your site.
{% endstep %}
{% endstepper %}


---

# 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/adaptivecx/getting-started/activate/integrations/data-connections.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.
