Viewports

A Viewport in Bidkernel defines a screen width range (breakpoint) for a property. Viewports are used in targeting rules — for example, to send bid requests to certain bidders only on mobile, or only on desktop.

Why Use Viewports? Link to section

Modern websites are viewed on a wide range of devices, from small smartphones to large desktop monitors, and demand differs by device: some bidders and integrations perform well on mobile but not desktop, or vice versa.

By configuring viewports, you can scope bidders and integrations to a device class instead of running them everywhere.

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. Optional; if left blank, the viewport matches any width up to the maximum width.
  • Maximum Width: The maximum screen width in pixels. Optional; if left blank, the viewport matches any width above the minimum width.

For example:

  • Mobile: 0px to 767px
  • Tablet: 768px to 1023px
  • Desktop: 1024px and above

Viewports and Targeting Link to section

Once your viewports are defined, you can reference them in the targeting rules of bidders and integrations. When a rule targets a viewport, it only applies when the user's screen width falls within that viewport's range.

Viewports do not control ad sizes. Responsive slot sizes are configured in page code via the size mappings of defineSlot() — see the Ad Slots documentation.

Confirm Action