Viewports
A Viewport in Bidkernel allows you to define screen size thresholds (breakpoints) for your web properties. By defining viewports, you can create responsive ad layouts that automatically adjust which ad sizes are requested and rendered based on the user's device screen size.
Why Use Viewports? Link to section
Modern websites are viewed on a wide range of devices, from small smartphones to large desktop monitors. Serving a large desktop ad (like a 970x250 billboard) to a mobile user will result in a broken layout. Conversely, serving a small mobile ad (like a 320x50) on a desktop wastes valuable screen real estate.
By configuring viewports, you can map specific Ad Slots to different sizes depending on the active viewport.
Configuring Viewports Link to section
When setting up a viewport, you typically define:
- Name: A descriptive name for the viewport (e.g.,
Mobile,Tablet,Desktop). - Minimum Width: The minimum screen width (in pixels) for this viewport to become active.
- Maximum Width: The maximum screen width (in pixels) for this viewport. This is optional; if left blank, the viewport will match any width greater than the minimum width.
For example:
- Mobile: 0px to 767px
- Tablet: 768px to 1023px
- Desktop: 1024px and above
Viewports and Ad Slots Link to section
Once your viewports are defined, you can assign viewport-specific sizes to your Ad Slots.
If a specific viewport matches the user's device, the Ad Slot will use the sizes mapped to that viewport. If no viewports match, or if a viewport isn't explicitly configured with sizes for an Ad Slot, the system will gracefully fall back to using the Default Sizes defined for that slot.
For more information on how to configure these sizes, see the Ad Slots documentation.