Content integration tutorial
Uniform enables you to build custom integrations that provide Uniform access to any content source with an available API. This allows you to extend Uniform's no-code data mapping and edge caching capabilities to any content source you like.
Do you need a custom integration?
A custom integration gives you full control over how you interact with an external content source, as well as the UI available to Uniform users for working with the content source.
In many cases, the HTTP Request data type offers everything you need to integrate external content. We have a recipe on making content from a REST endpoint available to Uniform.
If you've determined that you do, in fact, need a custom integration, this tutorial will guide you through the process of building one.
New CMS integration starter kit
We have a new CMS integration starter kit that implements an essential external CMS integration using a mocked CMS API. If you are building a content integration (for CMS or any content repository), this is a great starting point.
making content from a REST endpoint available to Uniform.
note
About the integration#
This tutorial guides you through the process of building a custom integration for a WordPress site. The reason for building a custom integration is you want to provide a more tailored experience for people using the integration than the HTTP Request data type offers.
A custom integration consists of the following components:
Component | Description | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Web application | Provides the UI for configuring the integration and the logic to interact with the data source. In this case, the data source is a WordPress site. During this tutorial, the application will run on | |||||||||||||||||
Manifest | Tells Uniform how to incorporate the integration into the Uniform UI. The manifest is written using JSON. This manifest should not be confused with the Uniform Context manifest, which is used for visitor classification and testing. | |||||||||||||||||
Open a terminal and run the following command: npx @uniformdev/cli@latest new-integration
| When asked for a team to add the custom integration to, select your team. About this step A custom integration must be registered in your Uniform team. This can be done manually, but the | When asked for the name of your integration, enter the following value: WordPress Site Integration
| When asked for the project you want to add the integration to, select your project. About this step A custom integration can be added to any project in your Uniform team. This can be done manually, but the | When the command is finished, a Next.js application will be running on port About this step The | ||||||||||||||
Create the following file:.envUNIFORM_API_KEY=
UNIFORM_TEAM_ID=
UNIFORM_PROJECT_ID=
| Set the following values in the file:
|