Data buckets

Data buckets are a type of container for your data, similar to a Google Analytics 4 property. They are used by Personalization and Analytics to store and retrieve data, and they define configurations or connections such as metrics and data sources.

Every environment where Contentful Personalization or Contentful Analytics is installed, comes with two data buckets:

  • Main –  This bucket should be used as the place for production data.

  • Development – This bucket should be used for testing purposes.

Each data bucket has its own configuration: 

  1. SDK key – A unique identifier that authenticates and authorizes the Experience SDK and Experience API. Using the sdk key, you can determine where events are written for analytics and which profiles/personalizations are read.

  2. Data sources – A data source is an app that contains relevant customer data you can connect to Contentful Personalization and sync traits and events into the selected bucket. For more information about data sources, see Data connectors.

  3. Metrics – Metrics measure your conversions and other actions for which you are optimizing with your Experiences. For more information about metrics, see Set up metrics.

For information on how to connect a data bucket, see Set up Contentful Personalization

You can change the data bucket your environment is connected to so you can run experiments and personalizations on different audiences.

To connect a different data bucket:

  1. Log in to the Contentful web app.

  2. Click Apps, and select Installed apps.

    Apps navigate to installed apps
  3. Click Configure next to Contentful Personalization. The app configuration page is displayed.

  4. In the Data bucket drop-down field, select a different bucket to connect to.

    Ctfl Personalization: Connect different data bucket
  5. Click Save.

As a best practice, we recommend connecting to an alias (e.g., production, staging) rather than a specific environment. When you later point the alias to a new environment, the data bucket connection remains intact because experiences/audiences follow the alias.

We recommend you connect a specific environment only when you explicitly need bucket bindings on an environment that is not behind an alias. 

NOTE: This can introduce conflicts if multiple environments are connected that host identical Experiences or Audiences. 

How to connect an alias

To connect to an alias:

  1. Log in to the Contentful web app.

  2. Click the environment switcher, and select an alias that points to your target environment.

    Environment swithcer
  3. Click Apps and select Installed apps. 

    Apps navigate to installed apps
  4. Click Configure next to Contentful Personalization. The app configuration page is displayed.

  5. Under the “Data buckets" tab, choose Main or Development as your data bucket.

  6. Click Save. The alias is now connected. Switching the alias later preserves the connection.

How to connect a specific environment

To connect to a specific environment:

  1. Log in to the Contentful web app.

  2. Click the environment switcher, and select the environment (not the alias).

  3. Click Apps and select Installed apps. 

    Apps navigate to installed apps
  4. Click Configure next to Contentful Personalization. The app configuration page is displayed.

  5. Under the “Data buckets" tab, choose the desired bucket.

  6. Click Save to bind that environment directly.

The current bucket’s Data sources and Metrics are read‑only. To edit them, navigate to the Optimization tab under the organization settings. For more information about editing metrics, see Set up metrics.