> ## Documentation Index
> Fetch the complete documentation index at: https://buttercms.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AI content suggestions

> Use the AI assistant for content ideas, and build personalized recommendations with Collections and third-party personalization tools.

> [!NOTE]
>
> ButterCMS does not ship a recommendation engine. The built-in [AI assistant](https://buttercms.com/docs/create-content/ai-assistant/ai-assistant-content-creation.md) works on the text you select in a WYSIWYG field. Behavior-based recommendations and real-time personalization come from your own code or from the third-party tools listed further down, with ButterCMS supplying the content through its API.

## How AI enhances content suggestions

AI transforms content presentation from a static, one-size-fits-all approach to a dynamic, user-centric experience:

### Behavior-based recommendations

AI tracks and analyzes user activity (visited pages, time spent on content, previous purchases, and engagement with past recommendations) to suggest content or products users will likely engage with.

**Benefits:**

* Users tend to spend more time on sites showing relevant content
* Personalized recommendations can improve conversions
* Visitors find what they need faster
* AI insights help businesses understand what works best

### Dynamic real-time content delivery

Instead of showing everyone the same static content, AI personalization adapts websites in real time based on who is visiting. Changes can range from tweaking headlines to completely overhauling messaging and UI elements.

**Example:** A first-time visitor might see an introductory message with a site tour, while a returning customer could be greeted with exclusive discounts based on their past interactions.

## Building content suggestions with ButterCMS

Personalization within ButterCMS can be achieved using the Collections content type. By creating a Reference field in a component, you can programmatically populate content from collection records based on user segments.

### Step 1: Create a personalization Collection

Create a Collection to store personalized content recommendations:

**Suggested fields:**

* **Segment Name** (Short Text) - Customer grouping/segment from your CRM or CDP
* **Product Recommendations** (Reference) - Links to recommended products or content
* **Cookie Target** (Short Text) - Used to match frontend cookies for displaying content

### Additional fields to consider

| Field | Type | Use Case |
| - | - | - |
| Promo Banner Text | Short Text | Display personalized promotional banners |
| Top Product Recommendation | Reference | Spotlight products in footers or sidebars |
| Content Recommendations | Reference (Multiple) | Suggest related articles or pages |
| Call-to-Action Text | Short Text | Customize CTAs per segment |
| Hero Image | Image | Show different hero images by segment |

## Implementing personalized suggestions

### Frontend implementation

Here's how to fetch and display personalized content based on user segments:

```javascript theme={null}
import Cookies from 'js-cookie';
import { useState, useEffect } from 'react';

function PersonalizedContent({ cookie_target }) {
  const [mappedProducts, setMappedProducts] = useState([]);
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    if (cookie_target) {
      const fetchPersonalizedProducts = async () => {
        try {
          const response = await getPersonalizedProducts(cookie_target);
          setMappedProducts(response);
        } catch (error) {
          console.error('Error fetching personalized products:', error);
        } finally {
          setLoading(false);
        }
      };
      fetchPersonalizedProducts();
    }
  }, [cookie_target]);

  // Conditionally render based on cookie presence
  if (Cookies.get(cookie_target) !== 'true') {
    return null;
  }

  return (
    <div className="personalized-recommendations">
      {/* Render personalized content */}
    </div>
  );
}
```

`getPersonalizedProducts` is your own function that queries the personalization Collection by segment through the [Collections API](https://buttercms.com/docs/api-reference/collections/retrieve-collection.md). You can set cookies based on URL query parameters (from ads or emails) or when users log into their accounts.

> [!NOTE]
>
> **Privacy Note**: When using cookies for personalization, ensure compliance with GDPR, CCPA, and other privacy regulations. Implement proper consent mechanisms and clearly disclose data usage in your privacy policy.

## AI-powered content recommendation strategies

### Predictive analytics

AI tools can predict what users may need or want, often before they realize it themselves:

* **Timely Offers** - Suggest discounts, subscriptions, or complementary products at the right moment
* **Churn Prevention** - Detect patterns that signal potential drop-offs and trigger retention strategies
* **Demand Forecasting** - Understand seasonal trends and prepare content accordingly
* **Optimal Timing** - Reach users when they're most likely to engage

### Adaptive search

Traditional search uses basic keyword matching. AI-powered adaptive search understands user intent and analyzes past behavior:

* **Context-aware suggestions** help users find content faster
* **Relevant options** increase conversion likelihood
* **Continuous improvement** based on user behavior and trends

## Content topic suggestions

### Using the AI assistant for content planning

The AI assistant sees only the text you select and the request you type. It cannot read your other pages, analytics, search trends or competitor sites. Within that limit it is a quick way to brainstorm from a draft you already have:

* Select a finished post and ask for related topics to build a content cluster.
* Select a section and ask which reader questions it leaves unanswered.
* Open the AI Assistant dialog with nothing selected and ask for ideas for an audience and season.

The answer lands in the WYSIWYG field, so run these prompts in a scratch page or delete the output after you have copied the ideas.

### AI prompts for content ideas

Type these into the AI Assistant dialog:

```text theme={null}
"Based on this blog post about [topic], suggest 5 related
topics we could cover to create a comprehensive content
cluster."

"Analyze this content and identify questions readers might
have that we haven't addressed."

"Suggest 10 content ideas for [industry/niche] that would
appeal to [target audience] during [season/event]."
```

## Third-party AI personalization tools

For advanced personalization, consider integrating specialized AI platforms with ButterCMS:

### Braze

Customer engagement platform for personalized messaging across email, SMS, mobile, and paid media.

**Key features:**

* Predictive analytics for customer behavior
* Real-time personalization with "Action Paths"
* Connected content pulling from APIs
* AI-powered recommendations across channels

### Adobe Target

AI-powered testing and personalization within Adobe Experience Cloud.

**Key Features:**

* Automated A/B and multivariate testing
* Rule-based personalization for audience segments
* Real-time user identification and personalization
* Same-page and next-page personalization

### Dynamic Yield

AI-powered platform for individualized digital experiences.

**Key Features:**

* AI-driven navigation personalization
* Cross-channel recommendation engine
* Targeted email promotions
* AI-powered product recommendations

## Headless CMS + AI personalization

A headless CMS like ButterCMS is a powerful enabler of AI content personalization:

* **API-Driven Integration** - Easily connect with AI tools like Dynamic Yield, Adobe Target, or Braze
* **Omnichannel Delivery** - Deliver personalized content across web, mobile, email, and beyond
* **Structured Content** - Define reusable components that AI can mix and match
* **Localization Ready** - AI can dynamically serve correct language versions based on user preferences

## Best practices for AI content suggestions

> [!NOTE]
>
> **Privacy First**: Always obtain user consent and follow regulations like GDPR when collecting data for personalization.

### Implementation tips

1. **Start simple** - Begin with basic segmentation before implementing complex AI
2. **Test thoroughly** - A/B test personalized vs. non-personalized experiences
3. **Monitor performance** - Track metrics like engagement, conversion, and satisfaction
4. **Iterate continuously** - Refine algorithms based on performance data
5. **Maintain fallbacks** - Always have default content for new or unidentified users

### Quality assurance

| Check | Why it matters |
| - | - |
| Relevance testing | Ensure suggestions actually match user interests |
| Diversity | Avoid filter bubbles by occasionally introducing variety |
| Freshness | Include new content alongside proven performers |
| Accuracy | Regularly audit AI recommendations for quality |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.