# Audience Insights: Getting started

Source: https://dev.arcxp.com/audience-insights/developer-docs/getting-started/

Learn about Audience Insights

Audience Insights provides you tools and built workflows to collect, organize, and activate user data. With flexible storage options, you can capture bookmarks, preferences, and other key data points to better understand and engage your audience. User content preferences leverage Arc XP Native Specification (ANS), Author and Site Services, connecting user data directly with Arc XP CMS products and tools. IAB Audience Taxonomy templates ensure the collected data is consistent, comparable and actionable. While Key-Value Pairs provide endless options for flexibility & custom data flows.

To get started using Audience Insights, you will need to enable the feature in the Subscriptions Settings Admin. See: [Managing Audience Insights](https://docs.arcxp.com/en/products/audience-insights/managing-audience-insights.html).

> **Note:**
> 
> By enabling Audience Insights data storage, you agree not to collect PCI or other sensitive data, as defined by applicable law. Storing such data may breach your contract, and clients assume all liability.

For an overview of Audience Insights features and capabilities, see the [Audience Insights Overview](https://docs.arcxp.com/en/products/audience-insights.html).

## Using Audience Insights SDKs and APIs

We provide a set of public APIs and SDK methods that allow you to connect your end users with our system. We also provide a set of developer APIs for backoffice operations that require an Arc XP Developer Token to access.

To interact with our public Audience Insights APIs, you can either call the APIs directly or use our SDK packages. Our SDK methods act as wrappers that help developers interact with our APIs more easily. We strongly recommend using our SDKs, as these libraries handle various tasks for you.

### API Reference

All available [public APIs](https://dev.arcxp.com/api/audience-insights/) are documented in our Open API documentation.

### SDK Quick Start

#### Pre-requisites

- Access to the @arcxp Github Package repository.
- npm or another Node package manager installed in your development environment.
- @arc-publishing/sdk-identity installed in your project to handle authentication for Audience Insights SDK methods that require it.

If your GitHub account does not have read access to the GitHub Packages under the @arcxp GitHub org, contact [Arc XP Customer Support](https://support.arcpublishing.com/). Add your GitHub developer token to your .npmrc file, then install the package to your React project.

The Arc XP Audience Insights SDK is published to GitHub packages.

See: <https://github.com/arcxp/arc-commerce-sdks/pkgs/npm/sdk-audience-insights>.

#### Installation & Usage

Using your preferred Node package manager, execute the following command in your npm project:

Terminal window

```shell
npm install @arcxp/sdk-audience-insights
```

Install the Identity SDK as well:

Terminal window

```shell
npm install @arc-publishing/sdk-identity
```

After you have them installed, include the SDKs in your code. To access the right API endpoints through the SDKs, specify an API Origin before calling any other SDK methods. You will need to pass `Identity` when initializing `Audience Insights`, as several methods require authentication, and the authentication is handled by `Identity`.

```js
import Identity from '@arc-publishing/sdk-identity';
import AudienceInsights from '@arcxp/sdk-audience-insights';

// Initialize Identity SDK
Identity.options({
    apiOrigin: 'https://{ApiOrigin|CDN}',
});

// Initialize Audience Insights SDK
AudienceInsights.options({
  apiOrigin: 'https://{ApiOrigin|CDN}',
  identity: Identity
});
```

You can now use the Audience Insights SDK methods in your code.

For SDK method reference, see:

- [How to use SDKs and APIs for Bookmarks](https://dev.arcxp.com/audience-insights/developer-docs/how-to-use-sdks-and-apis-for-bookmarks)
- [How to use SDKs and APIs for Key Value Pairs](https://dev.arcxp.com/audience-insights/developer-docs/how-to-use-sdks-and-apis-for-key-value-pairs)
