Was this page helpful?

Quick start guide

Table of contents

Introduction

This quick start guide walks you through setting up Contentful Analytics from scratch.

NOTE: Contentful Analytics is currently in beta. Reach out to your sales representative for access.

It assumes that your application implements Contentful Analytics in a React-based frontend and covers the following steps:

  1. Create a Ninetailed account.
  2. Create a Contentful account.
  3. Create a new space in the Contentful web app.
  4. Connect Contentful as a content source.
  5. Select the content types you want to extend with Contentful Analytics dashboards.
  6. Install and integrate the Experience SDK. Use version 7.17.6 or later.
  7. Enable Built-in AI Features for the Analytics Agent.
Important: Contentful Analytics does not require a Contentful Personalization license. It is a standalone product that can be used with or without personalized content.

Step 1: Create a Ninetailed account

NOTE: Skip this step if you already have a Ninetailed account.

To create a new account:

  1. Open the legacy Ninetailed app.
  2. Click Sign up. The "Account sign-up" page is displayed.
  3. Enter your email address, name, and company name.
  4. Review the Terms of Service and Privacy Policy.
  5. If you agree with the terms, click Sign up. A verification email is sent to the email address you provided.
  6. Open the verification email and click the link included in it. The legacy Ninetailed app is displayed.
  7. Set a password and click Activate. Your account is created.

Step 2: Create a Contentful account

NOTE: Skip this step if you already have a Contentful account.

To create a Contentful account:

  1. Open the sign-up form.
  2. Enter the required details to set up your account.
  3. Select the CAPTCHA check box.
  4. Click Sign up. Your account is created.

Step 3: Create a new space in the Contentful web app

NOTE: Skip this step if you already have a Contentful space.

To create a new space:

  1. Log in to the Contentful web app.
  2. Click the environment switcher. Environment switcher
  3. Click the organization name, and select Organization settings & subscriptions. Organization settings
  4. Navigate to the "Spaces" tab. The spaces overview page is displayed.
  5. Click Add new space. The space configuration page is displayed.
  6. Choose a space license for your space, and click Continue.
  7. Enter your space details, and click Continue.
  8. Review the details, and, if everything is in order, click Confirm and create. Your space is created.

Step 4: Connect Contentful as a content source

To connect Contentful as a content source in the legacy Ninetailed app:

  1. Log in to the legacy Ninetailed app.
  2. Navigate to the "Content Sources" page. Ninetailed Content Sources page
  3. Click Set up your first Alias or Set up your first Environment. The "Create new content source page" is displayed.
  4. Select Contentful. The authentication page is displayed.
  5. Select the Region for your project, and click Authenticate.
  6. Authorize the connection by logging in to your account. Once the authorization is complete, the list of available aliases and environments is displayed.
  7. Choose the alias or environment where you want to install Contentful Personalization.
  8. Optional: When prompted to create the connection, you can toggle off installing Merge Tags if you have a limited number of content types you can use within your Contentful environment.
  9. Enter a name and, optionally, a description for the connection.
  10. Click Create Content Source. The content model of the selected project is extended with the following content types: Ninetailed Audience, Ninetailed Experience, and Ninetailed Merge Tag (unless toggled off when creating a Contentful connection).

Step 5: Select content types to extend with Contentful Analytics dashboards

You can decide which content types display Content Analytics dashboards by enabling them:

  1. Log in to the Contentful web app.
  2. Navigate to the “Content model” tab.
  3. Select the content type you want to enable entry-level analytics for (e.g., Page).
  4. In the left sidebar, click Entry editors.
  5. Under “Available items”, add the installed Contentful Personalization app.
  6. Click Save. The “Analytics” tab is displayed in the entry editor for any entry of that content type.

Step 6: Install and integrate the Experience SDK

The fastest way to integrate Contentful Analytics into your application is by using our JavaScript Experience SDK.

The installation and integration can be broken down into four steps:

a. Install the SDK

Install a suitable version of the Experience SDK for your application and install the Insights Plugin.

NOTE: Use version 7.17.6 or later.

b. Create a Ninetailed instance

The Experience SDK provides a Ninetailed instance that holds and updates the profile that identifies a user and provides methods to send events to the Experience API. It is instantiated by providing the Ninetailed API key and Ninetailed environment, and can be further configured through optional parameters.

The Ninetailed API key is in the Ninetailed legacy app dashboard. Ninetailed Content Sources page

Your Ninetailed environment will be either main or development and is visible in the top left corner of the dashboard.

c. Create and send events

In Contentful Analytics, user activities are stored as page, track, and identify events, which the application sends to the Experience API. Integrate your application with Contentful Analytics by ensuring that the application:

  • Sends a page event when a user views a page.
  • Sends a track event when a user performs an action that you want to measure.
  • Sends an identify event when a user performs an action that identifies them as a user who has visited the application before.
  • Sends a component event when a user views a Contentful entry. component events are automatically sent by the SDK.

The Experience SDK provides an <EntryAnalytics /> component for wrapping React components. A wrapped component will automatically send a component event to the Experience API if a user views it.

Sending events directly to the API is possible, but using the Experience SDK is much more convenient. For more information on integrating your application with the Experience SDK, see the Send events section of its documentation.

d. Validate your integration

We recommend using our Live Events view to validate your integration of Contentful Analytics.

To access the Live Events view:

  1. Log in to the Contentful web app.
  2. Navigate to the “Optimization” tab.
  3. In the left sidebar, click Live Events.
  4. Activate the “Live event streaming” toggle.

The Events dashboard displays the type of events that Contentful Analytics receives over time, and the Event streaming log lists individual events. If your setup is correctly configured, live events should be coming in. If no events are coming in, check your Analytics setup.

NOTE: Only organization admins can access the Event streaming log.

Step 7: Enable Built-in AI Features for the Analytics Agent

The Analytics Agent is the AI assistant that allows you to ask contextual questions about your content and instantly receive AI-powered content answers, both as text and visual elements. The Analytics Agent relies on Contentful's AI features, so you must first enable them at the organization level.

NOTE: Only organization admins can enable AI Features.

To enable AI features at the organization level:

  1. Log in to the Contentful web app.
  2. Navigate to the “Optimization” tab.
  3. In the left sidebar, click Analytics Agent.
  4. Click Go to Organization Settings.
  5. Click Continue to organization settings.
  6. Enable the Built-in AI Features option.
  7. Review the pricing and number of approved output words modal, then click Enable.
  8. Review Contentful’s AI Terms of Service. If you agree, click Accept terms to enable Built-in AI features.