# Offsite Contextual Feeds and Programmatic Requests: Page Context, Macros, and Signals

When your video runs on a partner's property, that property's context does two jobs. It decides which of your videos play, and it travels as signals on each request your tag makes. This page covers both.

It's part of [How Offsite works](https://begenuin.com/developers/browse-by-products/offsite/offsite-what-it-does-and-where-to-start). To choose between the VAST, JavaScript Display, and Dynamic Feed versions of a tag, see [Tags for Distribution](https://begenuin.com/developers/browse-by-products/offsite/tags-for-distribution). For how a tag goes live and what comes back to your reports, see [Go Live on Partner Properties: Activation, Consent, Reporting, and Attribution](https://begenuin.com/developers/browse-by-products/offsite/offsite-activation-consent-reporting-attribution).

## How a partner page's context picks your videos

The way your videos reach a partner's page decides how they're picked.

| Where your video runs | What decides which videos play | Status |
| --- | --- | --- |
| A partner's placement or embed that draws from your videos | The partner page's context, ranked by Maya | Live |
| A paid partnership in the partner's feed | The page's address and keywords, and the viewer's location | Live |
| An ad creative or Extended O&O tag | The content priority you set, the same for every viewer | Live |
| A Dynamic Feed tag | The page's context and the viewer's cohort, ranked at serve time | Coming soon |

### Partner placements and embeds that draw from your videos

A partner you approved in [Network](https://begenuin.com/developers/browse-by-products/network/network-what-it-does-and-where-to-start) can let its own placements and embeds draw from your videos next to its own. In its Business Account, the partner picks the network brands each placement or embed draws from. Its page then sends its context with every feed request, and [Maya](https://begenuin.com/developers/browse-by-products/supervised-intelligence/supervised-intelligence-what-it-does-and-where-to-start#maya-genuin-s-orchestrator) ranks your videos for that page.

- **Matching**: The page context, a short phrase or comma-separated keywords, is matched against each video's description, AI-generated description, and transcript. They weigh 2, 1.8, and 1.5, and a video's best field counts.
- **Scoring**: The final score is 80% context match and 20% recency, so among equally relevant videos the newer one plays first.
- **Other signals**: Location, time, audience segments, and the viewer's interests can also narrow or boost the result.
- **Dynamic sections**: A placement style of type Dynamic builds its sections from the page's context and address on the first request, then caches them for 15 minutes.

For example, a travel publisher's page about ski trips sends `page_context: 'ski trips, Alps, winter travel'`. Your videos whose descriptions or transcripts mention skiing in the Alps rank first, and the newest of the equally relevant ones leads.

Videos with no description, AI-generated description, or transcript never match a contextual request. Give the videos you want to travel a clear description.

[Network distribution: place your content in partner inventory](https://begenuin.com/developers/browse-by-products/network/network-distribution-place-your-content-in-partner-inventory) explains how partners accept your content. [Deliver contextual feeds with page, user, and location context](https://begenuin.com/developers/developer-resources/sdk/contextual-embeds-how-they-work-and-how-to-configure-them) explains when the other signals apply, and [Personalization and relevance: how Maya ranks every feed](https://begenuin.com/developers/browse-by-products/control/personalization-and-relevance-how-maya-ranks-every-feed) covers the ranking in depth.

### Paid partnerships in the partner's feed

A paid partnership shows your videos in the partner's placement on the pages that match its targeting.

| Dimension | Matches when |
| --- | --- |
| Page URL | The page's address is exactly one you listed |
| Keyword | The page's keywords, such as its meta and SEO keywords, include one you listed |
| Location | The viewer is in a country, state, or city you listed |

- Dimensions combine with OR, so one match is enough. Matching all of them (AND) is coming soon.
- A page that sends targeting shows matching paid partnerships first and falls back to untargeted ones. A page that sends no targeting never shows a targeted paid partnership.
- Paid partnerships don't target audience segments.

On the partner's pages, the Web SDK reads the page's address, its `<meta name="keywords">` tag, and the viewer's location from the IP address. The partner's developer can override each one with the `targeting` option of `window.genuin.init()`, or of `window.genuin.update()` when a single-page app changes route. The SDK keeps up to 100 keywords of up to 256 characters each, and shortens a page address longer than 2,048 characters.

### Ad creatives and Extended O&O tags

Ad creatives and Extended O&O tags play the posts you chose, in the order you set. The partner page's context doesn't change that order, and every viewer sees the same videos. To let the page's context choose, run your videos through a partner's placement that draws from them.

### Dynamic Feed tags (coming soon)

> **Note** The Dynamic Feed version of a tag is coming soon. This section describes how it will work.

The Dynamic Feed version brings Maya's contextual ranking to an offsite tag. It carries no fixed creative. Each time it serves, Maya picks videos from the groups you allow, for that page and that viewer. It fits one tag that runs across many partner pages you can't plan clip by clip.

- At serve time, the partner's placement passes the destination page's context through to the tag.
- Maya ranks videos from your allowed groups for that context and for the viewer's cohort. Page context comes first among its signals, followed by each video's group and topic.
- Cohorts come from your audience segments, and Maya uses them only under your agreement and the viewer's consent. Without consent, the tag renders without personalization.
- Maya applies your brand safety profile and exclusions to every pick.
- Pacing and a frequency cap control how often the tag serves.

| Setting | What it controls |
| --- | --- |
| Group allow-list | The groups Maya can draw videos from |
| Context passthrough | Passes the partner placement's context to Maya at serve time |
| Brand safety profile | The safety rules applied to every pick |
| Pacing | How delivery spreads over time |
| Frequency cap | How often the tag serves to the same viewer |

Groups are the units Maya draws from, so [Communities and groups](https://begenuin.com/developers/browse-by-products/control/brand-communities-and-groups-structure-content-for-relevance) helps you decide which ones to allow. [Brand Safety Profile](https://begenuin.com/developers/browse-by-products/control/brand-safety-profile) explains what the profile describes.

## What each request carries

### Feed requests from a partner's placement or embed

The partner's page sends these signals in the body of each feed request. [Deliver contextual feeds with page, user, and location context](https://begenuin.com/developers/developer-resources/sdk/contextual-embeds-how-they-work-and-how-to-configure-them) gives the full request reference.

| Signal | Field | What the page sends |
| --- | --- | --- |
| Page context | page_context | A short phrase or comma-separated keywords describing the page |
| Previous page | previous_page_context | The context of the page the viewer came from |
| Page address | url | The page's URL. The Web SDK sends it automatically. |
| Location | geo, place | Coordinates (lat, long, radius_limit), or a named place (country, region, city, zip_code) |
| Time | time | A timestamp, for content scheduled to show at certain times |
| Audience | user_context, user_segments | The viewer's current intent, and audience attributes the partner holds |
| Network brands | brands_ids | The network brands whose videos the feed can draw from |
| Targeting | targeting | The page's keywords, address, and location, matched against paid partnership targeting |

### Requests from the offsite script

Ad creatives and Extended O&O tags run on Genuin's offsite script. The partner places the code from your Business Account, and its ad server or app adds its own macros to the script's address. The script reads them once, when it loads.

```html title="Partner macros on the offsite script"
<div class="gen-ext" data-tag-id="{{TAG_ID}}" style="width: 300px; height: 600px;"></div>
<script src="<<GENUIN_OFFSITE_SDK_URL>>?gdpr={{GDPR}}&gdpr_consent={{GDPR_CONSENT}}&us_privacy={{US_PRIVACY}}&ifa={{IFA}}&country={{COUNTRY}}" defer></script>
```

Copy the code from **View Code** rather than retyping it, because it carries the tag's ID and the current script URL, and keep the rest of the generated code as it is. Each `{{…}}` stands for the partner's own macro for that value.

| Parameter | What it carries |
| --- | --- |
| gdpr | Whether GDPR applies to the viewer: 1 or 0 |
| gdpr_consent | The viewer's IAB TCF consent string |
| us_privacy | The IAB US Privacy string |
| dnt | The Do Not Track signal |
| ifa | The device's advertising ID |
| deviceid | The device ID |
| country | The viewer's country |
| r | The viewer's region, as a state code such as MI |
| m | The viewer's metro (DMA) code |
| loc | The viewer's city |
| loclat, loclong | The viewer's latitude and longitude |
| appn, appv | The app's name and version, when the tag runs in an app's web view |
| appb | The app's bundle ID |
| appsi, appsu | The app's store ID and store URL |
| tagId | The tag's ID, used in place of data-tag-id |

- The script drops empty values, and placeholders the partner left unfilled such as `{ifa}` or `~ifa~`.
- It records every value except the store URL with each event it reports.
- It reads the page's URL itself: the page's address, the parent page's address from inside a frame on the same domain, or the referrer when the parent is on another domain.

The script then fills these placeholders in each ad request whose address asks for them. Values are URL-encoded.

| Placeholder in the ad request | Filled with |
| --- | --- |
| [PAGE_URL] | The page's URL |
| [GDPR] | gdpr |
| [GDPRCONSENT] | gdpr_consent |
| [DNT] | dnt |
| [LOCATION_LAT], [LOCATION_LON] | loclat, loclong |
| [APP_BUNDLE] | appb |
| [STORE_ID], [STORE_URL] | appsi, appsu |

The US Privacy string isn't filled into ad requests yet; the script records it with events only.

### Ad breaks in your videos

In the content priority of an Extended O&O tag or a paid partnership, each video can carry ad breaks from one of two sources:

- **Genuin Demand Source**: Demand from across the Genuin network runs in the break. Choose **Pre Roll**, **Mid Roll**, **End Roll**, or any mix.
- **Own Demand Source**: A VAST tag URL you supply, such as one from your own ad server.

Each break's request carries the placeholders above wherever its address asks for them.

### What the tag tells the partner's page

The tag reports whether its ad filled, so the partner can act on it:

- When an ad fills, the tag calls `window.adFillCallback(tagId)` and, inside a frame, posts `{ type: 'adFillCallback', tagId }` to the parent page.
- When it finds no ad to fill, the tag calls `window.noAdsCallback(tagId)` and posts `{ type: 'noAdsCallback', tagId }`, so the partner can pass the slot back to its own ad server.

The tag ID lets a page that runs several tags tell which one filled.

## Limitations

- **No contextual ranking on tags yet**: Ad creatives and Extended O&O tags play their content priority for every viewer. The Dynamic Feed version is coming soon.
- **Context needs text**: Videos with no description, AI-generated description, or transcript never match a contextual request.
- **OR only**: Paid partnership targeting combines its dimensions with OR. AND is coming soon, and audience segments aren't a targeting dimension.
- **Consent comes from the partner**: The offsite script doesn't read the consent banner on the partner's page. It uses the consent values the partner puts on the script's address.
- **US Privacy string**: It's recorded with events but not filled into ad requests yet.
- **Dynamic sections**: They're cached for 15 minutes per page context and address, so a change to your videos takes up to that long to show.

## Build on it

- [Embed the Genuin Web SDK on your digital properties](https://begenuin.com/developers/developer-resources/sdk/how-do-you-embed-and-configure-the-genuin-web-sdk-on-your-website) covers loading the script, sign-in, page context, and events.
- [Go live with monetization in your feeds, apps, and partner pages](https://begenuin.com/developers/developer-resources/sdk/go-live-with-monetization-in-your-feeds-apps-and-partner-pages) covers the live ad surfaces, such as in-feed ads and IAB units rendered from a tag ID in your app.
- [Create an ad creative for partner pages](https://begenuin.com/developers/developer-resources/sdk/how-brands-implement-iab-compatible-embeds-for-media-and-advertising-partners) shows the full code a partner places.
- [Ad tag reference: VAST, IAB sizes, and macros](https://begenuin.com/developers/browse-by-products/offsite/ad-tag-reference-vast-iab-sizes-and-macros) lists the formats and sizes.

The tag and feed calls in the [Business Account API](https://begenuin.com/developers/developer-resources/api/api-overview#business-account-api-v1-api-keys-and-oauth) are proposed, not live; see [Live API today and the Business Account API roadmap](https://begenuin.com/developers/developer-resources/overview/live-api-today-and-the-business-account-api-roadmap).

## See also

- [Go Live on Partner Properties: Activation, Consent, Reporting, and Attribution](https://begenuin.com/developers/browse-by-products/offsite/offsite-activation-consent-reporting-attribution)
- [Tags for Distribution](https://begenuin.com/developers/browse-by-products/offsite/tags-for-distribution)
- [Audience Extension Tag](https://begenuin.com/developers/browse-by-products/offsite/audience-extension-tag)
- [Network distribution: place your content in partner inventory](https://begenuin.com/developers/browse-by-products/network/network-distribution-place-your-content-in-partner-inventory)
