What are Contextual Embeds? How do I configure and display contextual feeds as onsite embeds?

Understanding Contextual Feed

A contextual feed is a dynamic content stream personalized to user’s current situation, using factors like users’ interests and geographical location. Its primary goal is to deliver relevant, tailored information. The feed generates video recommendations by leveraging multiple contextual inputs, including the page context, search keywords, user context, and geolocation.

This approach ensures that each user receives content that is most pertinent to them at any given moment, enhancing engagement and user experience. The recommendations adapt in real time as your context changes, making the feed both dynamic and highly relevant.

How Contextual Feeds Work with Video Content

In a contextual feed, video selection and ranking are based on how relevant each video is to the user's current situation. The system creates a personalized video feed by evaluating several types of context, with each type represented as a separate field in a structured input—such as page context, search keywords, user context, geolocation, URL, and other contextual data.

At any given moment, the feed uses only one context type to generate recommendations. Context types include:

  • Webpage context: the page the user is currently viewing
  • Search query context: keywords entered by the user
  • User profile context: attributes like age, bio, and preferences
  • Geographic context: the user's latitude and longitude

This approach ensures that video recommendations are always relevant to the user's immediate context, delivering a more personalized and engaging experience.

Feed Generation Process:

The feed generation process consists of three main stages:

  1. User Profile-Based Feed Generation
    • Uses detailed user profile data to retrieve relevant videos.
    • If no match is found, it falls back to context-based processing.
    • Handles cold start (insufficient user data) by using contextual or geo-based logic.
    • Prioritizes ranking based on user engagement: shares (highest), sparks (medium), views (lowest).
  2. Context-Based Feed Generation
    • Processes text-based inputs (page context, search queries, user bio) to extract keywords and intent.
    • Incorporates geo-location data for regionally relevant content.
    • Constructs and executes an OpenSearch query to fetch relevant videos.
  3. Feed Ranking & Final Output
    • Ranks videos using a weighted formula:
      • Context score (normalized matching score from OpenSearch)
      • Recency (newer videos get higher scores)
      • Popularity (weighted sum of normalized view, spark, comment, and share scores)
    • Final score calculation:

Final_score = 0.34 * Context_score + 0.33 * Recency_score + 0.33 * Popularity_score

  • The ranked feed is presented to the user in the descending order of calculated scores.

Essentially, the contextual feed is designed to furnish video content that exhibits maximal pertinence and captivation in relation to the user's particular situation. This increases user engagement.

For the contextual feed, a true or false flag will indicate its activation. The following input parameters are required:

index.html
{

"brand_id": int,

"communities": [

{

"community_uuid": str,

"groups": [str, str, str]

},

{

"community_uuid": str,

"groups": [str, str, str]

}

],

"user_uuid": str,

"user_interest": [str, str, str] or [],

"page_session": str,

"genuin_user": bool,

"limit": int,

"contextual_feed": bool,

"user_weight": float,

"recency_weight": float,

"popularity_weight": float,

"page_context": {

"page_context": str,

"compare_with": str (video/community/brand/group/location),

"location": (lat, long),

"location_radius": int (in km)

}

}

When contextual_feed is enabled, the feed is generated based on the provided context. The system first filters videos by brand_id. Next, it creates a context vector using the input context. The behavior then depends on the compare_with parameter:

  • If set to "community," the feed matches communities with similar descriptions.
  • If set to "brand" or "video," it matches similar brands or videos.
  • If set to "location," it filters videos within a specified radius.

This process ensures that the feed remains personalized and relevant to the user’s current context.

Detailed instructions regarding the provision of these parameters are specific to each Software Development Kit (SDK). Please consult the comprehensive documentation for the respective SDKs to ascertain the precise methods for parameter transmission.

Upon receipt of the aforementioned parameters, videos are assigned a matching score. Subsequently, videos are presented in the feed according to a descending order of said matching scores. If these optional parameters are not provided, videos will be displayed according to standard operating procedures.

Configure and display contextual feeds as onsite embeds:

Refer to the following links for detailed documentation on configuring the contextual feed for web, ios and android respectively:

This documentation provides step-by-step instructions for integrating and customizing the contextual feed within your web application.

COMPANY

Genuin Footer