# Lytics use cases and technical implementation guide

- **Authors:** Andrew Seatter, Eric Huiza, Lo Etheridge
- **Published:** 2026-06-17T13:30:10.000Z
- **Updated:** 2026-06-18T12:28:24.064Z
- **Tags:** personalization, taxonomy
- **Chapters:** 5
- **Source:** [https://developers.contentstack.com/guides/lytics-use-cases-and-technical-implementation-guide](https://developers.contentstack.com/guides/lytics-use-cases-and-technical-implementation-guide)

---

## Table of Contents

1. [Use case 1: A/B testing](#use-case-1-ab-testing)
2. [Use case 2: Anonymous behavior segmentation](#use-case-2-anonymous-behavior-segmentation)
3. [Use Case 3: Identity resolution](#use-case-3-identity-resolution)
4. [Use case 4: First-party data activation](#use-case-4-first-party-data-activation)
5. [Helpful documentation and next steps](#helpful-documentation-and-next-steps)


> What you'll build (time-to-value): A working personalization pipeline where Lytics audiences and attributes activate Contentstack Personalize experiences (A/B tests, segmented experiences, and identity-based personalization) using data captured from your site and/or first-party sources.

## This Guide is for

- Customer developers implementing Contentstack + Contentstack Personalize + Lytics (Data & Insights).
- Solution engineers / technical teams supporting implementation.

## Learning Outcomes (What You'll Be Able to Do)

By the end of this guide, you can:

- Explain when to use each of the four Lytics-powered use cases and their respective value.
- Configure prerequisites (Stack, Personalize, Lytics account, Data Activation Layer, JSTag/SDK).
- Implement and validate:
- A/B Testing (and Multi-Armed Bandit)
- Anonymous Behavior-based Segmentation
- Identity Resolution
- First-Party Data Activation

- Verify that data is flowing and experiences are activated, using clear checkpoints.

## How to Use This Guide

Pick one of these paths:

- Path A (End-to-end): Complete prerequisites, then do Use Cases 1–4 in order.
- Path B (Jump-in): If prerequisites are already complete, jump directly to a use case and follow the "Validate" steps to confirm your environment is ready.

## Architecture Overview (Conceptual)

- Your website/app sends behavioral and identifier signals via Lytics JSTag/SDK. 
- Lytics uses those signals (plus optional first-party data sources) to build profiles and audiences/segments. 
- Data Activation Layer (DAL) connects your Contentstack Stack, Contentstack Personalize project, and Lytics account to sync audiences and live attributes. 
- Contentstack Personalize then uses the synced audiences and attributes to deliver experiences and distribute variants (A/B, MAB, segmented experiences).

> Validation checkpoint: Before building experiences, confirm you can: (1) see signals arriving in Lytics and (2) target a Lytics segment inside Contentstack Personalize.

## Setting Up for Success (Prerequisites)

Ensure the following are set up before you begin:

- Contentstack Stack: Your content container with taxonomies created and linked to content types.
- Contentstack Personalize: Prepared to handle variant distribution.
- Lytics Account: Ready to provide near real-time user data.
- Data Activation Layer: Connects your Stack, Personalize project, and Lytics account for audience syncing.
- Lytics JSTag/SDK: Installed on the front-end to capture user behavior.

## A Closer Look at the Required Components

Component

Requirement

Stack

Container for all your content and configuration inside Contentstack with taxonomies created and added to a certain content type. Refer to this documentation on creating taxonomies and linking them to a content type.

• [Create a taxonomy](https://www.contentstack.com/docs/developers/taxonomy/create-a-taxonomy)

• [Add a taxonomy to a content type](https://www.contentstack.com/docs/developers/taxonomy/add-taxonomy-to-a-content-type)

Contentstack Personalize

Handles Variant distribution tied to segments from data and insights

Lytics account

Provides Near Real-Time Data on users that is synced to Contentstack Personalize, handling variant distribution

Data Activation Layer (DAL)

Prerequisites: Stack, Personalize Project and tied to your Lytics account. This will sync audiences to your Personalize project. Refer to this documentation for setup: [Data Activation Layer Creation](https://www.contentstack.com/docs/data-and-insights/create-data-and-insights-lytics-integration).

You will need a Stack, a Personalize Project and a website hosted and accessible.

The Data Activation Layer is necessary for ensuring segments built in Lytics are synced to your Personalize project, along with live user attributes being synced to your Personalize project when a user is browsing.

Lytics jstag/SDK

Installed on the front end of your site. [Lytics JavaScript Tag](https://docs.lytics.com/docs/lytics-javascript-tag). 

(If using the Event Tracking feature in your launch project refer to this documentation to automatically add the tag to your deployed site: [Event Tracking in Launch](https://www.contentstack.com/docs/launch/event-tracking-in-contentstack-launch). You will need to have a consent handler in place to enable user tracking when using this feature.)

Learn how to create a Data Activation Layer in Contentstack: [Data Activation Layer Creation](https://www.contentstack.com/docs/data-and-insights/create-data-and-insights-lytics-integration)



---

## Use case 1: A/B testing

## Use case 1: A/B testing

### Why does this matter? 

A/B Testing and Multi-Armed Bandit (MAB) distribution, orchestrated by Contentstack Personalize and fueled by Lytics data, ensure that every user interaction is an optimized opportunity. Use A/B testing for decisive, statistically robust outcomes on major changes, and leverage MAB's continuous machine learning to dynamically maximize real-time conversions and revenue from high-traffic elements, guaranteeing that the best-performing experience is always prioritized.

### What is an A/B test? What is MAB?

Concept

Description

When to Use

A/B Test

Compares many versions of a single variable, typically an element on a webpage, to determine which performs better against a defined goal.

When you have a strong hypothesis about a specific change, want definitive statistical proof, and the experiment needs a set duration or sufficient sample size.

Multi-Armed Bandit (MAB)

Machine learning approach that continuously allocates traffic to the best-performing variation during the experiment, favoring the variation that is showing the most success.

When the cost of showing a sub optimal experience is high, you have a shorter window for testing, or you want to maximize immediate conversions/rewards while learning.

### When to use A/B testing or MAB?

- Use A/B Testing when you have a strong hypothesis, need definitive statistical proof, and have a set experiment duration. Ultimately, use A/B testing when you need to make foundational changes, high-stakes decisions, or when you need a clear, statistically sound winner to deploy permanently.
- Use MAB to continuously allocate traffic to the best-performing variation. Ideal for high-traffic elements (like hero banners) where you want to maximize immediate conversions while learning. When you want to optimize high-traffic, continuous elements (e.g., product recommendation slots, hero banners) where maximizing real-time performance is critical, use MAB.

## How to activate

- Navigate to your Contentstack Personalize Project: Click the New Experience button in the top right corner.
- Select Experience Type: Select A/B test from options of experiences.
- Name A/B test: Name your A/B test and save the general details on the bottom right-hand side of the screen. View [creating A/B test documentation](https://www.contentstack.com/docs/personalize/create-ab-test-experience).
- Select Variant Distribution: Navigate to Configuration on the left hand side of the screen. Select traffic allocation (e.g., equally split, MAB, custom settings).
- Create Variants: Below the Variant Distribution option, click the + Add Variant button. Name your Variant and add the rest of your test cases the same way.
- Add Event to Track Conversion: Once you're finished adding your variants, add an event that is tied to the A/B test to track conversions (if using events, one will need to be created before creating a segmented experience). [View Events Documentation.](https://www.contentstack.com/docs/personalize#working-with-events)
- Choose a Target Group: Below the Events section, select a target group. There are 2 options: Everyone or Selective. If you choose Selective you can target a specific audience that you've built in Lytics. Once that is done you can save your draft.
- Link Content Types: Now that your draft is saved we can navigate back to the CMS and into our Stack. Once inside your stack navigate to Settings, scroll down on the left hand side of your screen till you see Variants as an option and click the variants button. Youwill see a menu of all of your created experiences, select your newly created A/B test. Once inside the CMS settings for your A/B test select the content types you wish to link to your variants. These content types will act as the personalized content for your A/B test.
- Create Personalized Content: Create an entry for the content type you associated with your A/B test in the previous step (e.g., Homepage, Landing Page, etc). Publish base content for this entry, once that's done click the button near the top right hand side of the screen that says [Base Entry]. You will see a dropdown appear with the variants you created. Select the variant you wish to modify, once you've edited content save and publish your entry to your desired environment. (Using Live Preview or Visual Builder is best practice to visualize your changes when editing variants.) View [Creating Personalized Content Documentation](https://www.contentstack.com/docs/personalize/create-personalized-content).
- Go Back to the Experience and Activate it: Now that you've created an A/B test, created variants, linked them to content types and created entries for your variants it's time to activate your A/B test. Navigate back to your Personalize project and click Configuration on the left hand side of your screen. At the bottom left hand side you will see the Activate Draft button, click that button and your A/B test is now live! You can track impressions and conversions via the analytics sections of your A/B test below the configuration tab. View [Experience Analytics Documentation](https://www.contentstack.com/docs/personalize/experience-analytics).
- Depending on your front-end framework, you will need to use a different SDK to retrieve and initialize your personalization experiences. Here is an [example using Next.js](https://www.contentstack.com/docs/personalize/setup-nextjs-website-with-personalize-vercel).

> Validate (recommended): After activation, confirm (1) impressions are incrementing, (2) conversion event fires, and (3) analytics shows variant performance.



---

## Use case 2: Anonymous behavior segmentation

## Use case 2: Anonymous behavior-based segmentation

### Value statement

Anonymous Behavior-based Segmentation, powered by Lytics, unlocks the ability to personalize user experiences before a customer ever identifies themselves. By collecting and analyzing real-time, non-personally identifiable signals such as page views, content interactions, and taxonomy tags, Lytics dynamically segments users based purely on their demonstrated intent and interests. This capability ensures that even first-time or returning anonymous visitors immediately receive highly relevant, contextually appropriate experiences, bridging the gap between initial engagement and eventual identity resolution to maximize conversion potential.

### User journey

- User explores content tagged with a given Taxonomy
- Taxonomy is pulled from Contentstack Entry and sent to Lytics associating a user's profile with an interest in particular.

- Anonymous segmentation
- While the user still hasn't provided us with an identifier, the user is added to the segment we configured on Lytics for users that show an interest in content associated with the taxonomy you defined.

- Personalized attribute sync
- Attributes and user segments get synced to Contentstack Personalize preparing our user to get delivered a personalized experience based on the interest they have shown in cuisine.

- Curated home page example
- See something on the home page that is curated for interest (e.g., a dominant hero banner featuring images relevant to "Taxonomy X Enjoyer").


Validate: Confirm taxonomy values are sent and mapped, segments evaluate correctly, and content is targeted as expected.

## How to activate

- Create Taxonomy field: In this use case we're utilizing taxonomy as a benchmark for user behavior/interests. To do that we need to set up Lytics to listen for the signals. We can start by creating a field named Taxonomy in our Lytics Schema. In Lytics, navigate to Building Profiles -> Schema -> Fields on the left hand side of the screen inside our Lytics account and create a new field. In our case we want to look at the most recent taxonomy viewed so we'll set our merge operator on this field to "latest" so that the most recent taxonomy value received by Lytics will be associated with our user's profile. Press 'Create field' at the top. Data Type should be string.

2. Create a aapping for our Taxonomy field: Now that we have a field created for Taxonomy we need to create a mapping for this field in order to receive the

signals from our Lytics Jstag SDK. Navigate to Building Profiles -> Schema -> Mappings and create a new one. Search for our newly created Taxonomy Field and select it. For our expression on this mapping we're going to type taxonomy and select the default stream. Type in taxonomy in the expression field, too. No condition is needed. This means that we can send over information about a user's viewed Taxonomy field by using the key taxonomy in our code base 

(ex: jstag.send({taxonomy: taxonomyFromContentstack});). Press Create Mapping at the top.

3. Publish schema: Navigate to Building Profiles -> Dashboard, scroll down to find Schema Summary and Publish the Changes you've made to the schema.

Follow the prompts/steps to publish your changes. You will need to provide 'Schema Version Details'

Press Publish to finish the update. It's recommended to reload the screen at this point, that way the UI will reflect the latest changes. View [Fields/mapping documentation](https://docs.lytics.com/docs/fields-mappings).

4. Build a segment: Navigate to Using Profiles -> Audiences and create new. Name your audience as you see fit, and scroll down to custom rule. When in the custom rule section search for your taxonomy field you created and select it. Then choose your operator — in our case the audience rule will be taxonomy equals cuisine — then click the add condition button. Check the API accessible box to ensure it gets synced to your Personalize project and save your new segment. Now press 'Create' at the bottom. View [Audience/Segments documentation](https://docs.lytics.com/docs/audiences).

Configure your Front End to Send Taxonomy from Contentstack on Page Load: In order for us to track when a user has viewed a page with our taxonomy on it we'll need to send that Taxonomy value over on page load. Below is an example of a useEffect hook that loops through all taxonomies and identifies the "article" type of taxonomy, pulls that value off of it and sends it to Lytics. This setup is valid in React or Next.js applications.

```javascript
useEffect(() => {
if (entry? taxonomies && entry?.taxonomies? length > 0){
const articleTaxonomy = entry?.taxonomies?.find(
(tax) = tax? taxonomy_vid === "article"
)?. term_uid || null;
if (articleTaxonomy) {
jstag.send({taxonomy: articleTaxonomy})
console.log("jstag.send ({taxonomy:", articleTaxonomy, "}); ")
}
}, [entry])
```

5. Create the Experience in Personalize: In Contentstack Personalize, click the New Experience button.

6. Select Experience Type: Choose a Segmented Experience.

7. Provide a Name and Description and move on to the Configuration section.

8. Add a variant to the experience.

9. Target the segment: In the Experience Configuration, navigate to the Target Group section, select Selective, and choose the Lytics segment you created (e.g., Taxonomy X Interest Segment').

10. Link variants and content types: Now that your draft is saved we can navigate back to the CMS and into our Stack. Once inside your stack navigate to Settings, scroll down on the left hand side of your screen till you see Variants as an option and click the variants button. You will see a menu of all of your created experiences. From here you can select your newly created experience. Linking Content Types to variants. 

11. Create personalized content: In the CMS, create variants or personalized entries for the linked Content Type(s) that are tailored to the anonymous user's demonstrated interest (e.g., a Homepage banner featuring "New Italian Recipes" for the 'Cuisine Interest Segment').

12. Go back to the experience and activate it: Save and Activate Draft in Contentstack Personalize. Anonymous users exhibiting the defined behavior will now see the personalized content based on their real-time actions.

Validate (recommended): Confirm (1) taxonomy values are sent on page load, (2) the taxonomy field populates on Lytics profiles, (3) the audience rule evaluates true for test users, and (4) the segment is selectable in Personalize targeting.



---

## Use Case 3: Identity resolution

## Use case 3: Identity resolution

### Value statement

Lytics Identity Resolution provides a single, unified view of every customer, seamlessly stitching together anonymous behavioral data (like site clicks and content views) with known identifiers (such as email or user ID) across all devices and channels. This capability transforms fragmented, siloed interactions into a persistent, comprehensive customer profile. By resolving identity upon the very first known interaction, it ensures personalization is relevant from day one, maximizing customer lifetime value and enabling continuity of experience regardless of where or when the customer engages with your brand.

### How to activate

Lytics captures email addresses as a primary mechanism for Identity Resolution. When a previously anonymous user submits an email address (e.g., via a lead form, newsletter sign-up, or login), the Lytics JavaScript Tag (JSTag) or SDK transmits this known identifier to the platform. This email address becomes the primary key for recognizing the user across future sessions and channels. Read more about [Identity Resolution](https://docs.lytics.com/docs/identity-resolution).

- Capturing an Email: There are many ways to capture email or an identifier from your web stream using Lytics. In this case it’s as simple as attaching jstag.send({email: inputValue}); on a form on your website. If you don’t want to dig into a codebase you can utilize the Pathfora SDK and the experiences functionality in Lytics. This document can walk you through building an experience to capture email input. Refer to these docs on how to create an email targeting form:

- [Lytics Experiences](https://docs.lytics.com/docs/experiences)


- [Grow your email marketing list](https://docs.lytics.com/docs/grow-your-email-marketing-list)


- [Pathfora](https://lytics.github.io/pathforadocs/)



Note: The screenshots provided for this use case were uploaded but are not yet resolvable to asset UIDs in the stack DAM, so they cannot be embedded in this JSON RTE field at this time.


- Verify email was captured: Navigate to Building Profiles → Search in your Lytics Account. Change the dropdown bar on the right-hand side to the email identifier, then search for an email address that has been identified.




Validate (recommended): Submit a test email, then confirm the profile is searchable by email and that prior anonymous behavior is now associated with the resolved identity.



---

## Use case 4: First-party data activation

## Use case 4: First-party data activation

### What is Zero-party / First-party / Third-party data?

Data Type

Description

Source

Zero-Party

Data customers intentionally and proactively share (e.g., preferences, desired price alerts).

Customer surveys, preference centers, quizzes.

First-Party

Data collected directly from the customer's interactions with your properties (e.g., purchase history, site clicks, CRM data).

Website/App behavior, CRM, Transactional systems.

Third-Party

Data purchased or licensed from external sources (e.g., demographic data, broad interest segments).

External data providers.

### What’s so special about first-party data?

Utilizing first-party data in analytics offers significant value by providing direct, high-quality insights into customer behavior and preferences. Unlike third-party data, first-party data is collected directly from the audience through owned channels, ensuring accuracy and relevance. This proprietary information enables more precise audience segmentation, personalized marketing campaigns, and deeper understanding of the customer journey, leading to higher engagement and conversion rates. Furthermore, as privacy regulations tighten and reliance on third-party cookies diminishes, leveraging first-party data becomes a sustainable and competitive advantage for driving targeted and effective business strategies, such as increasing bookings by 10%.

### How to activate

There are a variety of ways to connect your Lytics account to your First Party Data source. The most ideal way would be cloud connect which continuously keeps your First Party Data fresh with recurring imports and a variety of connectors such as Amazon Redshift, Databricks, Google BigQuery, Microsoft Azure SQL Database and Snowflake. In the case of our demo we utilized the webhook enrichment job to reach our custom built CRM, below I’ll walk through some steps that have crossover on both of these options.

- Connecting to your First Party Data: For connecting to cloud connect refer to this documentation https://docs.lytics.com/docs/managing-cloud-connections. When trying to understand what data is being passed through from your data provider, check Data Pipeline -> Streams and select the newly created stream from your connection. Then click recent events at the bottom to get an understanding of what is flowing in.
- Building Fields/Mappings: In order to effectively manage your First party data flowing in, you have to build fields and map them to the correct stream. The image below is an example of a response you can expect when importing First party data in from a new stream. In order to make use of this I’d need to create a new mapping for the field email tied to my Cloud Connect stream with the expression. This will receive the information at the origin.email location of the response from cloud connect and associate it with the known field email that already exists in our Lytics Account. This will stitch the First party data and Zero party data together into one joint profile with the power of identity resolution. 

```html
"origin.email": "mason.bailey61@example.com",
"origin. email_sha256": "fdf7be94a8008f18325f87b0398019b01b1f84cf758df9587823f5ff6eaac8e6",
"response. acquisition_source": "Facebook Ads"
"response. activities [0].data. channel": "Chat"
"response. activities [0].data.created_at": "2026-03-03T01: 05:03.514783+00: 00",
"response. activities[0].data.customer_id": "d7bc60d4-22ef-4722-b9d9-fd2070cfaa7c",
"response. activities [0].data.description": "Had chat conversation with support",
```

3. Publish Schema: Navigate to Building Profiles -> Dashboard scroll down to find Schema Summary and Publish the Changes you’ve made to the schema. Follow the prompts/steps to publish your changes. You will need to provide ‘Schema Version Details’.

4. Activating 1st Party Data: So now that we have connected our Zero and First Party data into one, let’s utilize it in effective personalization. With this information we can target things such as preferred activities, preferred room type, budget range etc. Through the audience builder we can segment users based on this knowledge, for example an audience where loyalty_tier equals Gold or an audience where preferred_activities contains Parasailing. 

```html
"response. lifecycle_stage": "First-Time Guest",
"response. loyalty_tier": "Gold",
"response. number_of_stays": "0",
"response. opt_in_status": "false",
"response phone": "+1-555-5039",
"response. preferences. adventure_relaxation_slider": "69",
"response. preferences. budget_range": "Budget",
"response.preferences. sustainability_interest": "true",
"response. preferences.travel_companions": "Couple",
"response. preferences. travel_frequency": "Quarterly",
"response. preferred_activities": ["Parasailing","Sailing","Kayaking"1,
"response preferred_room_type": "Executive Suite",
```

5. Build a Segment: Navigate to Using Profiles -> Audiences and create new. Name your audience as you see fit, and scroll down to custom rule. When in the custom rule section search for your newly created field and select it. Then choose your operator; for example, loyalty_tier equals "Gold", then click add the condition button. Check the API accessible box to ensure it gets synced to your personalize project and save your new segment. Now press ‘Create’ at the bottom.

6. Create an experience: Following the same steps in the first 2 use cases, create a segmented experience, create variants tied to your new segment, link content types to variants, create personalized content, and publish your segmented experience

Validate (recommended): Confirm first-party fields land on profiles, audiences evaluate correctly, and the segment is selectable in Personalize. Then activate a segmented experience and confirm targeted delivery.





---

## Helpful documentation and next steps

## Helpful Documentation

A/B testing

- [Getting Started with Contentstack Personalize with A/B Testing: An End-to-End Guide](https://www.contentstack.com/docs/personalize/create-ab-test-experience)



Launch

- [Setup Next.js Website with Personalize - Launch](https://www.contentstack.com/docs/personalize/setup-nextjs-website-with-personalize-launch)



Data and Insights (Lytics)

- [Delivering Personalized Experiences: A detailed end-to-end technical guide](https://docs.lytics.com/docs/delivering-personalized-experiences)
- [End-to-end Guide for Data & Insights (Lytics)](https://docs.lytics.com/docs/end-to-end-guide)
- [Working with Web Data](https://docs.lytics.com/docs/onboarding-web-data)
- [Connecting Warehouses](https://docs.lytics.com/docs/managing-cloud-connections)

Personalize

- [Create an Entry Variant](https://www.contentstack.com/docs/content-managers/entry-variants/create-an-entry-variant)

## Next Steps and Feedback

Congratulations! By mastering these four core implementations, you are now equipped to deliver hyper-relevant, high-converting adaptive digital experiences. Please share your feedback, challenges, and custom implementations with our developer communities so we can continue to refine these resources.For a deeper dive into the exact API specifications, check out the Lytics Documentation or the Contentstack Personalize Docs. Happy coding!

