Content Indexing

Learn how to index your content and enrich bid requests with content IDs.

Uploading Content Metadata

Before integrating with RTB and bid requests, you must index your app's content. This step is crucial for:

  • Associating every piece of content with a unique content ID.
  • Enabling advertisers to see the contextual data behind each ad impression.
  • Serving as the basis for later performance analysis.

Methods to index content:

API Upload

Use our RESTful API to submit content metadata immediately when new content is published or updated. The API accepts a payload that includes:

  • Content ID: A unique identifier (generated by you or via our system).
  • Textual Data: Headlines, summaries, keywords, or other descriptive content.
  • Media Assets: Lists of image URLs and video URLs related to the content.

Content Upload API Example

POST
/api/v1/content
{
  "content_id": "mobile-content-unique-id-12345",
  "text": "Breaking: New feature launched in our app!",
  "images": ["https://yourcdn.com/image1.jpg"],
  "videos": ["https://yourcdn.com/video1.mp4"]
}

UI Upload (Optional)

A web portal is available for publishers who prefer manual uploads. While this method requires additional support, it provides a fallback for content indexing if API automation is not possible.

Enriching Bid Requests with Content IDs

To ensure that each bid request reflects the current content context, you must include the corresponding content ID in your RTB payloads. This is achieved by adding your custom branded extension into the bid request. For example, using a branded namespace such as "AdHedge" ensures clarity in analytics.

Bid Request Enrichment

// Generate or retrieve your unique content identifier
val contentId = "mobile-content-unique-id-12345"

// Inject the branded custom extension via the global ORTB configuration:
val globalConfig = """
    {
      "ext": {
        // ... other extensions
         "AdHedge": {
            "content_id": "$contentId"
         }
      }
    }
""".trimIndent()

PrebidMobile.setGlobalOrtbConfig(globalConfig)

By ensuring every bid request carries the "AdHedge" extension with your content_id, advertisers and our analytics platform can reliably correlate bids with the specific content that generated them.

Was this page helpful?