Activate Your Segment Data for Real-Time AI Personalization with Shaped

In a world where personalization drives engagement, capturing cross-channel behavior is only half the battle — the real value lies in acting on it instantly. Segment unifies customer data from every touchpoint, but to unlock its full potential, you need intelligence layered on top. That’s where Shaped comes in — turning your Segment event stream into real-time recommendations, personalized search, and predictive insights with minimal setup. In this post, we’ll walk through how to integrate Segment with Shaped using AWS Kinesis and start delivering smarter, more adaptive user experiences right away.

Turning Unified Customer Data into Predictive Experiences

Segment has revolutionized how businesses collect and unify customer data. As a leading Customer Data Platform (CDP), Segment provides a central hub for tracking user interactions across websites, mobile apps, servers, and third-party tools, creating a comprehensive view of the customer journey. This unified data is invaluable for understanding your users, but the real challenge lies in activating it – transforming that rich historical and real-time stream into intelligent, personalized experiences as they happen.

How do you use the insights from a user's cross-channel behavior captured in Segment to instantly personalize the search results they see on your website? How do you recommend the perfect next product or piece of content based on their complete interaction history? This is precisely where integrating Segment with Shaped unlocks tremendous value.

Shaped is an AI-native relevance platform designed to ingest real-time event streams, like those unified by Segment, and apply state-of-the-art machine learning to understand user intent, predict behavior, and power personalized search, recommendations, and analytics via simple APIs. This post explains the benefits of connecting these platforms and provides a step-by-step guide on integrating Segment with Shaped using the AWS Kinesis destination.

Why Connect Segment to Shaped? Driving Value Across Use Cases

Connecting Segment's unified data stream to Shaped's AI engine moves you from data collection to intelligent action. It allows you to leverage the comprehensive customer view you've built in Segment to power a wide range of real-time, personalized experiences and gain deeper insights:

  • Hyper-Personalized Recommendations: Utilize the rich, cross-channel behavioral data from Segment to deliver truly relevant recommendations:
    • Dynamic "For You" Feeds: Curate highly personalized feeds of content or products that adapt based on a user's complete interaction history across all your platforms.
    • Contextual Product Recommendations: Suggest relevant items on homepages, product pages, or category listings, informed by Segment data.
    • "Similar Item" Discovery: Find items related by deep behavioral patterns learned from Segment events, not just simple metadata.
    • Next Best Action/Content: Predict the most relevant next video, article, or action for a user based on their journey so far.
    • Cart/Checkout Optimization: Offer intelligent upsells or cross-sells informed by the user's full profile.
  • Intelligent & Personalized Search: Transform search from a simple lookup tool into a personalized discovery engine:
    • Personalized Search Ranking: Tailor search result order based on individual preferences and behaviors captured across Segment sources.
    • Semantic Understanding: Leverage deep learning models trained on Segment data to understand the intent behind queries, improving relevance beyond keywords.
    • Improved Keyword Search: Boost the performance of traditional keyword search by incorporating behavioral signals from Segment.
  • Advanced Analytics & Deeper Insights: Go beyond standard dashboards by using Shaped's models trained on Segment data:
    • Cross-Channel User Journey Analysis: Understand complex user paths and predict future interactions based on patterns learned from the unified Segment data stream.
    • Rich User & Item Embeddings: Generate powerful vector representations of users and items for cohort analysis, audience segmentation, and understanding hidden relationships within your catalog and user base.
    • Personalization Performance Monitoring: Directly measure the uplift and business impact of AI-driven personalization powered by your Segment data.
    • Explainable AI: Gain insights into why the models make certain predictions or recommendations, leveraging the rich feature set derived from Segment events.
  • Real-Time Adaptability: Shaped models continuously learn from the live Segment event stream via Kinesis, ensuring all personalization adapts instantly to the latest user interactions.
  • Simplified ML Infrastructure: Avoid building and maintaining complex pipelines and ML systems to process Segment data for relevance. Shaped provides the managed AI layer.

How it Works: Segment -> Kinesis -> Shaped

The technical integration leverages AWS Kinesis Data Streams as a reliable, scalable bridge. Segment offers a built-in Kinesis Destination, allowing you to forward your event stream directly to a Kinesis stream provisioned and managed by Shaped. Shaped then securely ingests data from this stream to train its models.

Connecting Segment to Shaped via AWS Kinesis

Here’s the step-by-step process:

Step 1: Create the Shaped Dataset

First, create a dataset in Shaped specifically configured for Segment events. Using the SEGMENT schema type ensures Shaped sets up the appropriate event schema automatically.

Create a YAML file (e.g., segment_events.yaml):

segment_events.yaml
1 name: segment_events
2 schema_type: SEGMENT

Use the Shaped CLI to create the dataset:

CLI
1 shaped create-dataset --file segment_events.yaml

Verify the dataset creation status on the Shaped Dashboard or via the CLI (shaped list-datasets). It will transition from provisioning to ACTIVE.

Step 2: Retrieve Shaped Kinesis Details

Once the dataset is created in Shaped, retrieve the unique AWS Kinesis Data Stream name and IAM Role ARN associated with it. These are needed for the Segment configuration.

Use the Shaped CLI:

CLI
1 shaped view-dataset --dataset-name segment_events

The output will resemble this (ARNs and stream names will be unique to your dataset):

segment_events.yaml
1 dataset_name: segment_events
2 dataset_uri: https://api.shaped.ai/v1/datasets/segment_events
3 schema_type: SEGMENT
4 dataset_schema: <event_schema> # Schema details based on Segment spec
5 kinesis_stream_arn: arn:aws:kinesis:us-east-2:11111111111:stream/ShapedDatasetStream-abc123
6 kinesis_iam_role_arn: arn:aws:iam::11111111111:role/ShapedDatasetAccessRole-abc123

You need two pieces of information for the Segment setup:

  • The Stream Name: Extract the name part from the kinesis_stream_arn (e.g., ShapedDatasetStream-abc123).
  • The full IAM Role ARN: The value of kinesis_iam_role_arn (e.g., arn:aws:iam::11111111111:role/ShapedDatasetAccessRole-abc123).

(Note: You can also fetch these details via the Shaped API using a GET request to https://api.shaped.ai/v1/datasets/segment_events with your API key.)

Step 3: Configure Segment Kinesis Destination

Log in to your Segment workspace and configure the destination:

  1. Go to the Source you want to stream data from.
  2. Navigate to Destinations and click Add Destination.
  3. Search for and select the Amazon Kinesis destination.
  4. Click Configure Amazon Kinesis.
  5. Select the Source and click Confirm Source.
  6. In the destination settings, enter the details obtained from Shaped in Step 2:
    • AWS Kinesis Stream Name:
    • Enter the Stream Name (e.g., ShapedDatasetStream-abc123).
    • AWS IAM Role Resource Name (ARN):
    • Enter the full IAM Role ARN (e.g., arn:aws:iam::11111111111:role/ShapedDatasetAccessRole-abc123).
    • AWS Region:
    • Enter us-east-2 (Shaped provisions Kinesis streams in this region for Segment integrations).
  7. (Optional but Recommended) Filter Events: Consider using Segment's filtering capabilities within the destination settings or upstream in your Source Functions/Protocols to send only the most relevant events for personalization (e.g., key engagement events like views, clicks, purchases, completions). This can improve model focus and efficiency.
  8. Once configured, Enable the Destination using the toggle switch at the top.
  9. Save the changes.

Segment will now start forwarding events from your selected source to the Shaped-managed Kinesis stream.

What Happens Next? Fueling AI with Unified Data

With the connection established and data flowing:

  1. Real-Time Ingestion: Shaped securely ingests the unified event stream from Segment via Kinesis.
  2. AI Model Training: Shaped automatically trains sophisticated ML models on this rich, cross-channel data, learning complex user behaviors, preferences, and item relationships.
  3. Personalization APIs: Once models are ready, Shaped's simple APIs allow you to retrieve personalized rankings for search, recommendation slates, or user/item embeddings for analytics – all powered by your Segment data.
  4. Continuous Adaptation: Models continuously update as new events arrive, ensuring relevance stays high even as user behavior evolves across your platforms.

Conclusion: Activate Your Segment Data for Intelligent Action

Integrating Segment with Shaped transforms your unified customer data from a passive asset into an active driver of real-time personalization and deep user understanding. By following the simple Kinesis integration steps, you can harness the power of state-of-the-art AI to deliver superior recommendations, smarter search results, and richer analytics based on the comprehensive view provided by Segment. Stop just collecting data – start activating it with Shaped to create truly adaptive, personalized experiences.

Ready to unlock the full potential of your Segment data with AI?

Request a demo of Shaped today to see it in action with your specific use case. Or, start exploring immediately with our free trial sandbox.

Get up and running with one engineer in one sprint

Guaranteed lift within your first 30 days or your money back

100M+
Users and items
1000+
Queries per second
1B+
Requests

Related Posts

Jaime Ferrando Huertas
 | 
January 16, 2023

Microsoft vs Google - ChatGPT taking over search?

Nic Scheltema
 | 
November 14, 2024

Understanding Graph Convolutional Neural Networks for Web-Scale Recommender Systems

Nina Shenker-Tauris
 | 
September 5, 2024

Is the key to unlocking better user experiences in recommender systems found in exploration?