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

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

  • On the host side, on page load or through cookies on the server (or on the edge with middleware) 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

// 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 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.

1 Like