Tip #29: Understand companion positioning
What is companion positioning? The OpenX 2.8 user guide only mentions the topic very briefly, so it’s worth a deeper look.
Companion positioning is a way of ensuring that when one banner on a page is from a campaign, then all banners on the page will be from the same campaign. So, for example, imagine your web site has two zones on every page, and an advertiser says to you that they would like to advertise on your site, but only if they can have their banners in the two zones show up at the same time. This is when you want to use companion positioning.
Setting up companion positioning
Setting up companion positioning in OpenX is very simple. When you have an advertiser that wants a campaign with companion positioning, all you have to do is enable the “Companion positioning” option under “Miscellaneous” on the campaign property screen.

Enabling companion positioning for a campaign.
Effect of companion positioning
Consider the following example, where there are two advertisers, each with one campaign:
Advertiser 1, Standard Campaign:
- Banner 1: Linked to Zone 1
- Banner 2: Linked to Zone 1
- Banner 3: Linked to Zone 2
- Banner 4: Linked to Zone 2
Advertiser 2, Companion Campaign:
- Banner 1: Linked to Zone 1
- Banner 2: Linked to Zone 2
As you would expect, when the two zones are placed on a single page, there are five different possible outcomes — four different combinations of Advertiser 1’s campaign banners can be displayed, and one combination of Advertiser 2’s campaign banners. That is, as Advertiser 2’s campaign is set to be a companion position, it’s banners never show up with any other banners other than its own.
To see the above example in action, see the Tip #29 example page, which you can reload over and over to see how companion positioning ensures that the two companion banners only ever show together on a page.
Caveats
There are a number of caveats to be aware of when using companion positioning:
- When OpenX delivers one banner from a companion campaign, then all of the other zones on the page must have banners from the companion campaign. If any of the other zones on the page do not have a banner from that campaign that can be delivered (e.g. there is no banner from the campaign linked to the zone, or the banner has delivery limitations or capping applied that prevent the banner from being delivered), then no banner will be displayed in the zone1. You should ensure that your companion campaigns have banners linked to all zones that will appear on your page, and that all banners in companion campaigns have identical capping and delivery limitations!
- The whole point of companion positioning is to display multiple banners from the same campaign on the same page. If you want to run companion campaigns, remember that you must not have your zones configured with the “Don’t show a banner from the same campaign again on the same page” option!
- Older versions of OpenX had a bug in companion campaign delivery, which meant that if the first banner on a page was from a non-companion campaign, subsequent banners could still be from a companion campaign, resulting in a mixed non-companion/companion banner situation. You should upgrade OpenX to the latest stable release to avoid this issue.
- Companion positioning will not work with the iframe, Image and No Cookie Image zone tag types. Obviously, companion positioning will also not work with the Popup zone tag type, as this opens a new window, which contains just the one zone.
- If you are using the OpenX Market, it would make sense to not enable the Market for your companion campaigns. As your advertiser is paying to specifically have their ads displayed in all of your zones on a page at once, it does not make sense allow any of those banners be overridden by an OpenX Market banner!
Looks like the issue of using companion positioning for campaigns that are linked to zones where you would normally otherwise use the “Don’t show a banner from the same campaign again on the same page” option is being considered by the OpenX team: https://developer.openx.org/jira/browse/OX-5547
Wow, I was just thinking I wish OpenAds did this… and here it is!
I’m going to add another zone (medium rectangle) on just part of my site and I want the ads to be from the same advertiser (i.e., companion positioning).
Scenario: Let’s say I have advertisers that are guaranteed 10k 468×60 ads per month and only 1/2 of my advertisers have companion ads. Also, the portion of my site showing the new 300×250 ad only gets 1/5 as much traffic as the rest of the site.
My question: Will my advertisers 468 ads still show on the non-companion / 300×250 ad pages so they will still get their guaranteed fill?
NOTE: OpenX really should take some of that investment money and hire you to help write their manuals!
Hi!
If you have two zones (468×60 and 300×250), but most of your site only has the 468×60 zone, then a campaign with companion positioning will work just fine — so long as it is NOT a Contract campaign (that is not configured especially for such a scenario).
To explain:
1. For the first banner on your page, OpenX does not always know how many zones are on the page — e.g. with the JavaScript zone tag, it is impossible for OpenX to know how many zones are on the page when the first zone tag is invoked. So, OpenX simply picks a banner for the first zone based on the relative zone probabilities. All that happens with regards to companion positioning is that when the banner selected for this first zone happens to be from a companion campaign, a flag is set to ensure that all other banners on the page (if any!) will then be from the same campaign.
So, if you have a companion campaign linked to your two zones, but most of the time, there is only the 468×60 zone on the page, then OpenX will happily deliver a 468×60 banner from any campaign there, companion campaign or otherwise.
2. However, when you run a Contract campaign, you have deliver targets to meet. The campaign needs to deliver a certain number of impressions, as per your “contracted” requirements.
OpenX also tries to ensure that the impressions “contracted” to be delivered are shared between the banners in a campaign based on the relative banner weights. That is, if you set up a Contract campaign with a single 468×60 banner and a single 300×250 banner, both banners with weight 1, then OpenX will try to deliver even numbers of banners.
However, it will fail in doing so, as your site will have much less available inventory for the 300×250 zone. As a result, the Campaign will under-deliver every Operation Interval, and although OpenX will try to correct for this, it will always do so on the assumption that each banner should get an equal number of impressions, and every time, this will fail.
To address this, if you have approximately 1/5 as much traffic in the 300×250 zone, simply adjust the banner weights to that your 468×60 banner has weight 4, and you 300×250 banner has weight 1. This way, you Contract campaign would have 4/5 of the Contract campaign’s impressions, and your 300×250 banner will have 1/5 of the Contract campaign’s impressions. That should sort out the deliver issues in this case.