An integration template for projects using Croct and Sanity.

Introduction

Looking to add dynamic content blocks to your Sanity-powered site?

This template combines Sanity.io, Next.js, and Croct to help you implement dynamic content without changing your CMS.

It's the fastest way to add AB testing and personalization on top of Sanity Studio.

Unlike currently available plugins, you can run experiments at the component level rather than the field level. Croct replaces static component content with dynamic content, allowing you to manage everything directly on the UI while using Sanity content as a fallback.

Since it comes with built-in audience segmentation and analytics, there's no need to work on extra integrations with CDPs to segment visitors or analytics tools to gather insights.

Using Croct, you get:

  • AB testing support with real-time audience evaluation
  • Content personalization based on location, behavior, or custom rules
  • Built-in analytics and Bayesian analysis for every variant and experience
  • Seamless compatibility with your existing Sanity schemas
  • Fast implementation with zero CMS migration

Usage

Run the following command in an empty directory to create a new project using this template:

npx croct@latest use croct://integration/sanity

Start building in seconds

Paste the following command in your terminal and let the CLI do the rest.

npx croct@latest init