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
| Requirement | Detail |
|---|---|
| An embed or a placement | Context 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 page | A short phrase or comma-separated keywords, such as SUV listings or AI, LLM, robotics. This is what's matched against your videos. |
| Videos with text | Matching 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.
<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.
| Signal | Fields in the init call | What to send |
|---|---|---|
| Custom Context | page_context, user_context | A phrase describing the page, and one describing the viewer's current intent |
| Previous Page Context | previous_page_context | The context of the page the viewer came from |
| Location | geo: { lat, long, radius_limit } | Coordinates as decimals, and a radius |
| Place | place: { country, state, city, zipcode } | Named location, used where coordinates aren't available |
| Time | time | A timestamp, for content scheduled to show at certain times |
| User Segmentation | user_segments: { age, min_age, max_age, segment, gender, race } | Audience attributes you hold for the viewer |
| Product Detail Page (PDP) URL | url | The page URL; the Web SDK sends it anyway |
| Brand ID | brands_ids | Network brand ids whose content the feed can draw from |
| Community & Group ID | community_ids, loop_ids | Scope the feed to these communities or groups (loop_ids are group ids) |
| User Interests | user_interests | Interest labels you hold for the viewer |
| Posted By User | posted_by_user_ids | Show 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
- 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_contextmakes it a contextual feed, unless the context contains "surprise me", which asks for the default feed on purpose. - 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.
- 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.
- 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.
- 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:
| Field | Type | Notes |
|---|---|---|
| page_context | string | Triggers the contextual feed when no community or group ids are set |
| previous_page_context | string | Context of the previous page |
| url | string | Sent by the Web SDK as the current page URL |
| geo | object | lat, long, radius_limit, all numbers |
| place | object | country, region, city, zip_code |
| user_context | string | The viewer's current intent |
| user_segments | object | age, min_age, max_age, gender, user_segments (list), race (list), interests (list) |
| time | timestamp | For time-scheduled content |
| posted_by_user_ids | list | Restrict to these members' posts |
| community_ids, loop_ids | list | Restrict to these communities or groups |
| brands_ids | list of integers | Network brands to draw from; your own brand is always included |
| device_id, page_session, last_video_id | string | Set 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.
geois dropped unlesslatandlongare 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
- Embed your community on your website
- Get started with placements in Brand Control Center
- Contextual feed placements to transform the consumer journey
- Embed and configure the Genuin Web SDK on your website
- Use interest data for personalized recommendations
- Add a Genuin placement to your website
- How contextual feeds choose videos

