SeenthisBrandStories Module
Overview
The module enables publishers to integrate SeenThis Brand Stories ads within Prebid.js. This module provides communication between the publisher’s page and Brand Stories ad iframes, handling dynamic resizing, fullscreen mode, and responsive design considerations.
The module is bidder adapter agnostic and works with all Prebid.js adapters that serve Brand Stories creative content.
Configuration
This module requires no configuration. Once included in your Prebid.js build, it automatically handles Brand Stories ads when they are served.
Implementation
Basic Setup
- Include the SeenThis Brand Stories module in your Prebid.js build
- Configure your ad units as normal - no special configuration needed
- The module will automatically detect Brand Stories creatives and manage their behavior
Technical Details
Message Event Management
The module listens for specific message events from Brand Stories iframes and responds accordingly:
- Iframe resizing requests
- Fullscreen mode transitions
- Style and class modifications
- Margin calculations for responsive layout
CSS and Styling
The module dynamically applies CSS modifications to ensure proper display:
- Full-width responsive behavior
- Auto-height adjustments
- Dynamic margin calculations
- Class-based style modifications
Testing
A test page has been created to validate the integration:
Local Testing
For testing with your own Prebid.js build:
- Open the test page in Chrome
- Use the Network tab’s “Override content” feature
- Replace the Prebid.js file with your custom build
- Verify that Brand Stories ads display and behave correctly
Troubleshooting
Common Issues
- Ads not resizing properly: Ensure the module is included in your Prebid.js build
- Fullscreen mode not working: Check for conflicting CSS or JavaScript on the page
- Multiple instances interfering: The module handles this automatically, but ensure unique ad unit codes