Skip to main content

Context Enhancement Overview

Introduction

Context Enhancement provides rich, AI-powered contextual signals that enable intelligent ad targeting without relying on personal identifiable information (PII). These signals help bidders understand user intent, sentiment, and conversation context to deliver more relevant advertising experiences.

Why Context Enhancement?

Privacy-First Targeting

  • No PII Required: All signals are contextual and behavioral
  • GDPR/CCPA Compliant: Privacy-safe by design
  • Cookieless: Works in privacy-first environments
  • Transparent: Users understand context is analyzed

Better Performance

  • Higher Relevance: Match ads to user intent and sentiment
  • Improved CTR: Context-aware ads perform better
  • Premium CPMs: Rich context commands higher prices
  • Better UX: Relevant ads enhance user experience

AI-Native Design

  • Conversational Context: Designed for chat and AI interfaces
  • Real-Time Analysis: Signals generated per interaction
  • LLM-Friendly: Structured for AI consumption
  • Scalable: Handles high-volume conversational traffic

Core Components

1. Conversation Metadata

Operational metrics about the conversation:

  • Message Sequence: Position in conversation
  • Message Length: User engagement indicator
  • Think Time: User consideration time
  • Session Duration: Overall engagement
  • Quick Reply: Interaction type

Learn More: Conversation Metadata

2. Intent Analysis

Understanding what users are trying to accomplish:

  • Intent Classification: purchase_inquiry, information_seeking, support_request, comparison, objection_handling
  • Confidence Score: How certain the classification is
  • Topics: Identified conversation topics
  • Signals: Behavioral indicators

Learn More: Intent Analysis

3. Sentiment Analysis

Detecting emotional tone for tone-matched advertising:

  • Sentiment Value: positive, neutral, negative
  • Sentiment Score: Emotional intensity (0.0-1.0)
  • Tone Matching: Match creative tone to user sentiment

Learn More: Sentiment Analysis

How It Works

Request Structure

Context Enhancement signals are included in BidRequest.ext.aura:

{
"id": "bid-request-123",
"imp": [
{
"id": "imp-1",
"native": {
"request": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":80}}]}}"
}
}
],
"site": {
"domain": "aiplatform.com",
"cat": ["IAB19-30"],
"keywords": "family travel,golf,vacation"
},
"ext": {
"aura": {
"messageSequenceNumber": 3,
"messageLength": 45,
"isQuickReply": false,
"userThinkTimeMs": 2500,
"sessionDurationMs": 45000,
"intent": {
"value": "purchase_inquiry",
"confidence": 0.85,
"topics": ["family travel", "golf"],
"signals": ["asked_about_pricing"]
},
"sentiment": {
"value": "positive",
"score": 0.8
}
}
}
}

Signal Categories

Always Present

These signals are included in every bid request:

  • messageSequenceNumber
  • messageLength
  • isQuickReply
  • sessionDurationMs

Conditionally Present

These signals are included when available:

  • userThinkTimeMs (not available for first message)
  • intent (when intent can be classified)
  • sentiment (when sentiment can be detected)

Use Cases

Purchase Intent Targeting

Target users showing buying signals:

{
"intent": {
"value": "purchase_inquiry",
"confidence": 0.92,
"signals": ["asked_about_pricing", "ready_to_purchase"]
},
"sentiment": {
"value": "positive",
"score": 0.85
}
}

Strategy: Show product ads with clear CTAs and pricing

Information Seekers

Target users researching topics:

{
"intent": {
"value": "information_seeking",
"confidence": 0.88,
"topics": ["golf equipment", "beginner tips"]
},
"sentiment": {
"value": "neutral",
"score": 0.5
}
}

Strategy: Educational content and how-to guides

Comparison Shopping

Target users evaluating options:

{
"intent": {
"value": "comparison",
"confidence": 0.87,
"signals": ["comparing_options", "price_sensitive"]
},
"sentiment": {
"value": "neutral",
"score": 0.6
}
}

Strategy: Comparison charts and competitive advantages

Integration Levels

Level 1: Basic Metrics

Use conversation metadata only:

{
"ext": {
"aura": {
"messageSequenceNumber": 3,
"messageLength": 45,
"isQuickReply": false,
"sessionDurationMs": 45000
}
}
}

Benefits: Session depth targeting, engagement metrics

Level 2: With Intent

Add intent analysis:

{
"ext": {
"aura": {
"messageSequenceNumber": 3,
"intent": {
"value": "purchase_inquiry",
"confidence": 0.85,
"topics": ["family travel"]
}
}
}
}

Benefits: Intent-based targeting, topic matching

Level 3: Full Context

Include all signals:

{
"ext": {
"aura": {
"messageSequenceNumber": 3,
"intent": {
"value": "purchase_inquiry",
"confidence": 0.85
},
"sentiment": {
"value": "positive",
"score": 0.8
}
}
}
}

Benefits: Tone-matched ads, optimal targeting

Publisher Implementation

1. Analyze Context

class ContextAnalyzer {
async analyzeMessage(conversation, currentMessage) {
return {
metrics: this.calculateMetrics(conversation),
intent: await this.analyzeIntent(conversation),
sentiment: await this.analyzeSentiment(currentMessage),
}
}
}

2. Build Bid Request

function buildBidRequest(context) {
return {
id: generateId(),
imp: [...],
site: {...},
ext: {
aura: {
messageSequenceNumber: context.metrics.sequenceNumber,
messageLength: context.metrics.messageLength,
isQuickReply: context.metrics.isQuickReply,
sessionDurationMs: context.metrics.sessionDuration,
intent: context.intent,
sentiment: context.sentiment
}
}
};
}

3. Send Request

const context = await analyzer.analyzeMessage(conversation, message)
const bidRequest = buildBidRequest(context)
const bidResponse = await sendBidRequest(bidRequest)

Bidder Implementation

1. Extract Context

function extractContext(bidRequest) {
return bidRequest.ext?.aura || {}
}

2. Match Campaigns

function matchCampaigns(context, campaigns) {
return campaigns.filter(campaign => {
// Match intent
if (
context.intent &&
campaign.targetIntents.includes(context.intent.value)
) {
return true
}

// Match topics
if (context.intent?.topics.some(t => campaign.topics.includes(t))) {
return true
}

return false
})
}

3. Calculate Bid

function calculateBid(basePrice, context) {
let modifier = 1.0

// Increase for purchase intent
if (context.intent?.value === 'purchase_inquiry') {
modifier *= 1.5
}

// Increase for high confidence
if (context.intent?.confidence > 0.9) {
modifier *= 1.2
}

// Increase for positive sentiment
if (context.sentiment?.value === 'positive') {
modifier *= 1.1
}

return basePrice * modifier
}

Best Practices

1. Use Confidence Scores

Always check confidence before making critical decisions:

if (context.intent?.confidence > 0.8) {
// High confidence - proceed with intent-based targeting
}

2. Combine Multiple Signals

Don't rely on a single signal:

function shouldBid(context) {
return (
context.intent?.value === 'purchase_inquiry' &&
context.intent?.confidence > 0.8 &&
context.sentiment?.value === 'positive'
)
}

3. Respect Privacy

Never attempt to identify users:

// ✅ Good: Use contextual signals
const topics = context.intent?.topics

// ❌ Bad: Try to identify users
// Don't try to track users across sessions

4. Handle Missing Signals

Gracefully handle missing context:

function getBidModifier(context) {
if (!context.intent) {
return 1.0 // Default modifier
}

return calculateModifier(context.intent)
}

Performance Considerations

Latency

Context analysis adds minimal overhead:

  • Intent Analysis: ~10-20ms
  • Sentiment Analysis: ~5-10ms
  • Total Overhead: less than 30ms

Accuracy

Signal accuracy improves with conversation depth:

  • Message 1: 70-80% accuracy
  • Message 3+: 85-95% accuracy
  • Message 5+: 90-98% accuracy

Scalability

Designed for high-volume traffic:

  • Throughput: 10,000+ requests/second
  • Caching: Format definitions cached
  • Async Processing: Non-blocking analysis

Privacy & Compliance

No PII

Context Enhancement never includes:

  • User names or identifiers
  • Email addresses or phone numbers
  • Precise location data
  • Browsing history

GDPR Compliant

  • Contextual signals only
  • No user tracking
  • Consent not required for context
  • Right to object supported

CCPA Compliant

  • No sale of personal information
  • Opt-out mechanisms available
  • Privacy string support

Documentation

Core Components

Use Cases

Next Steps

1. Understand Components: Review each context enhancement component 2. Choose Integration Level: Decide which signals to implement 3. Implement Analysis: Add context analysis to your platform 4. Test & Optimize: Monitor performance and refine 5. Go Live: Deploy to production

Support

Questions?

Feedback

  • Submit via GitHub issues
  • Join community discussions
  • Participate in working groups