Deliver contextual feeds with page, user, and location context

Pass what a visitor is looking at, who they are, and where they are to an embed or a placement. Learn how Genuin turns those signals into a ranked feed.

A contextual feed is an ordinary embed or placement whose request carries context. When the request names a page topic and no specific community or group, Genuin searches your videos' descriptions and transcripts for that topic and ranks the matches. The same embed then shows SUV reviews on an SUV listing and loan explainers on a loan guide. Location, time, audience segments, and the viewer's interests narrow or boost the result. There are two ways to send the context, and this page covers both.

Before you begin

RequirementDetail
An embed or a placementContext rides on an existing configuration. See Embed your community on your website or Get started with placements in Brand Control Center.
A description of each pageA short phrase or comma-separated keywords, such as SUV listings or AI, LLM, robotics. This is what's matched against your videos.
Videos with textMatching reads each video's description, the AI-generated description, and the transcript. Videos with none of these never match.

Send context from an embed

The Web SDK takes context in contextualParams when you initialise the embed. The page's URL is sent automatically.

index.html
html
<div id="gen-sdk" class="gen-sdk-class" style="width: 100%; height: 600px"></div>
<script src="https://media.begenuin.com/sdk/<<SDK_VERSION>>/gen_sdk.min.js"></script>
<script>
  window.genuin.init({
    embed_id: '{{EMBED_ID}}',
    api_key: '<<YOUR_API_KEY>>',
    contextualParams: {
      page_context: 'electric SUVs, charging, range',
      geo: { lat: 37.7749, long: -122.4194 },
    },
  })
</script>

For several embeds on one page, give each container the gen-sdk-class class with data-embed-id, data-api-key, and data-page-context attributes, plus data-lat and data-long if you have them, and call window.genuin.init() once. In a single-page app, call window.genuin.update({ contextualParams: { page_context: '...' } }) when the route changes. The embed reloads with the new context. geo needs both lat and long, or it's ignored.

On Android, pass the same keys as a map: BGEmbedView(...).setConfig(contextualParams = hashMapOf("page_context" to "electric SUVs")). On iOS, pass them in the contextualParams dictionary of initializeEmbed.

Send context to a placement

A placement declares which signals it expects. In Brand Control Center, open Grow > On Site > Placement, open the placement, and on Configure > Implement tick each signal your page can supply. The generated code then includes a contextual_params block with a placeholder for each one.

The implementation signals of a placement, which decide what the generated code asks your page for.
SignalFields in the init callWhat to send
Custom Contextpage_context, user_contextA phrase describing the page, and one describing the viewer's current intent
Previous Page Contextprevious_page_contextThe context of the page the viewer came from
Locationgeo: { lat, long, radius_limit }Coordinates as decimals, and a radius
Placeplace: { country, state, city, zipcode }Named location, used where coordinates aren't available
TimetimeA timestamp, for content scheduled to show at certain times
User Segmentationuser_segments: { age, min_age, max_age, segment, gender, race }Audience attributes you hold for the viewer
Product Detail Page (PDP) URLurlThe page URL; the Web SDK sends it anyway
Brand IDbrands_idsNetwork brand ids whose content the feed can draw from
Community & Group IDcommunity_ids, loop_idsScope the feed to these communities or groups (loop_ids are group ids)
User Interestsuser_interestsInterest labels you hold for the viewer
Posted By Userposted_by_user_idsShow only posts by these members

Two toggles on the same tab change what Genuin gathers itself. On-Page Context Gathering by Crawler lets Genuin read the links and text of the page the placement renders on. Real-time context gathering reads the ads running on the page.

The web code is window.genuin.init({ style_id, placement_id, api_key, contextual_params: { ... } }). On iOS it's GenuinSDK.shared.initializePlacement(placementId:styleId:containerView:viewController:contextualParams:), and on Android BGPlacementView(placementId, styleId).setConfig(contextualParams = map). Copy the generated code from the Implementation Guide panel; it carries your ids and the fields you ticked.

How the feed is built

  1. Feed type. The feed service reads the request. Group ids make it a group feed and community ids a community feed. Otherwise a non-empty page_context makes it a contextual feed, unless the context contains "surprise me", which asks for the default feed on purpose.
  2. Retrieval. The context phrase is matched in OpenSearch against three fields of every video in your brand and the network brands you named. The description carries a weight of 2, the AI-generated description 1.8, and the transcript 1.5. A video needs a match in at least one field, and its best field counts.
  3. Scoring. Each match score is scaled to 0 to 1 across the result set. The final score is 80% that context score and 20% recency, so among equally relevant videos the newer one leads.
  4. Boosts and filters. A placement fills each section from the section's title, description, and keywords, with the style's filters applied. When Genuin enables its recommendation service for your brand, the other signals act on the ranking too. Community, group, and posted-by ids become hard filters, and the remaining signals multiply a video's score when they match. The multipliers are listed in How AI works in Brand Control Center.
  5. Dynamic sections. A placement style of type Dynamic has no fixed sections. On the first request for a page, Genuin derives sections from the page's context and URL, fills each from your videos, and caches the result for 15 minutes.

Request reference

The Web SDK posts to /goservices/feed/embed/home with your API key in the headers. The body fields that carry context:

FieldTypeNotes
page_contextstringTriggers the contextual feed when no community or group ids are set
previous_page_contextstringContext of the previous page
urlstringSent by the Web SDK as the current page URL
geoobjectlat, long, radius_limit, all numbers
placeobjectcountry, region, city, zip_code
user_contextstringThe viewer's current intent
user_segmentsobjectage, min_age, max_age, gender, user_segments (list), race (list), interests (list)
timetimestampFor time-scheduled content
posted_by_user_idslistRestrict to these members' posts
community_ids, loop_idslistRestrict to these communities or groups
brands_idslist of integersNetwork brands to draw from; your own brand is always included
device_id, page_session, last_video_idstringSet by the SDK for paging and de-duplication

Limitations

  • Context needs text to match. Videos without a description or transcript are never returned by a contextual query.
  • Community and group ids override context. A request with either becomes a community or group feed; use a placement's scope fields with care.
  • Both coordinates or none. geo is dropped unless lat and long are both present.
  • Fixed recency share. The 80 to 20 split between context and recency isn't configurable per request.
  • One context per embed instance. To change it without reloading the page, call update.
  • Dynamic sections are cached for 15 minutes per page context and URL, so a change to your videos takes up to that long to show in a dynamic placement.

See also

TRUST AND COMPLIANCE

© 2026 Genuin Inc.

Genuin Footer