# Custom CDP ( customer data platform) integration with Builder.io

**URL:** https://forum.builder.io/t/custom-cdp-customer-data-platform-integration-with-builder-io/313
**Category:** Technical Questions
**Created:** [December 4, 2020, 9:42pm UTC](https://forum.builder.io/t/custom-cdp-customer-data-platform-integration-with-builder-io/313 "2020-12-04T21:42:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![aziz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/aziz/32/2551_2.png) [@aziz](https://forum.builder.io/u/aziz)
#### Post date: [December 4, 2020, 9:42pm UTC](https://forum.builder.io/t/custom-cdp-customer-data-platform-integration-with-builder-io/313/1 "2020-12-04T21:42:08Z")

</div>

Our custom targeting attributes feature makes integrating with any modern CDP easy.

For example, to target content from builder to a specific audience segment

- Define custom targeting attribute for example call it `audience`  

- Create content with `audience` set to the desired audience segment  
 ![Screen Shot 2020-12-04 at 1.58.51 PM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/1X/b333bf0682f493e067dc04629553437e18c29611.png)

- On the host side, on page load or through cookies on the server (or on the edge with [middleware](https://www.builder.io/blog/fast-personalization-nextjs-edge-middleware-builder)) identify the user audience segment through the CDP API and set it using our SDK, once set, all fetched content will match the targeted audience

```auto
// pseudo
const audienceSegment = await myCustomCDP.identify({ user: currentUser.id })
// then anywhere before the builder content is fetched ,
// alternatively Builder also accept the targeting attribute as a query param for direct api calls
builder.setUserAttribute({ audience: audienceSegment })
// from now on builder will fetch corresponding content to the targeted audience

```

Optionally, for a better content creator experience you can also define [custom editor plugin](https://www.builder.io/c/docs/extending/plugins#:~:text=editor%20UI%20itself-,Custom%20type%20editors,-Custom%20editor%20plugins) and mark the `audience` custom targeting attribute with that type, in this case, you can in the plugin hit the CDP api to return a list of the audiences in builder for easier integration and use.

Happy to guide you through an integration as well if you contact us.
