## Preventing Ad From Appearing More Than Once Per Page View

If you have a page with multiple ad placements of the same ad size, it may happen that when you request ads, the same ad wins multiple spots.

If you'd prefer this _didn't_ happen, you can edit the **Distribution** settings to ensure that an ad can only win one of the slots at a time.

You can also set this so it limits not just the same ad, but an ad from that Flight, Campaign, or Advertiser.

**To create with API:**

1. Create a [**Flight**](https://dev.kevel.co/v1.0/docs/flights) that contains just the [**Ads**](https://dev.kevel.co/v1.0/docs/ads) you want to appear together
2. Set `"IsNoDuplicates": true, "DuplicateMode": _n_,

where n is an integer indicating which level no duplicates should be enforced on. Key follows: 1: Flight 2: Campaign 3: Advertiser 4: Creative.

**To set up with UI:**

1. In Flight settings, go to the Distribution tab
2. Check the box for **Don't allow Duplicates**
3. Select whether this should take place on the **Flight**, **Campaign**, **Advertiser**, or **Creative/Ad** level.
4. Save

> 📘  
> The **No Duplicates** feature only works when you have a single ad request. If you make multiple requests (even for the same page view), it will not work.

> 🚧  
> Distribution options will not work if your placements use Email or 3rd Party Ad Server type ad code.

## Companion Ads

Companion ads are a grouping of ads designed to be served simultaneously. For instance, you may wish to make sure that whoever has the top ad on your page also has the bottom one.

> 📘  
> A companion flight may contain a maximum of **20 ads** (1 selected + up to 19 companions). Flights exceeding this limit will return no companion result.

## How Companion Ad Targeting Works

When a companion flight wins, the **initially selected ad** goes through full targeting and filtering (day parting, site targeting, keyword targeting, etc.) like any other ad.

However, the **companion ads** in that flight are only filtered by:

- **Ad type** -- the companion's ad type must match at least one of the placement's accepted ad types
- **Zone** -- the companion's zone must match the placement's zone (if specified)

Other targeting rules -- day parting, geo targeting, site targeting, keyword targeting, etc. -- **do not apply** to companion ads. All companions in the flight will be submitted for allocation regardless of any ad-level targeting rules set on them.

> 🚧  
> Companion ads are **all-or-nothing**: every ad in the companion flight must be matched to a compatible placement, or none will serve. Do not rely on ad-level targeting rules (e.g., day parting) to reduce the number of companions that need to be matched. Instead, ensure your companion flight has no more ads than there are compatible placements in the request.

## Enabling Companion Ads

**To create with API:**

1. Create a [**Flight**](https://dev.kevel.co/v1.0/docs/flights) that contains just the [**Ads**](https://dev.kevel.co/v1.0/docs/ads) you want to appear together
2. Set `IsCompanion = true`

**To create with UI:**

1. Create a **Flight** that contains just the **Ads** to be shown together
2. Under the **Distribution** section of the **Flights** page, check "Always Serve Creatives in this Flight Together"
3. Save

## Requesting a Companion Ad

Once the Flight is enabled, you'll also want to ensure you're requesting the companion ads correctly:

**With API**

1. In your request, include a `placements` object for each placement that needs to serve in the companion. Make sure the `adType` matches the size of the ads.

**With Ad Codes**

1. Generate ad code by adding multiple placements (using the "+ Add Another" button) on the Ad Code page. Make sure they match the size of the ads.
2. Copy the div tags to the places on your site you want the ad to load, and then copy all of the script tag to the head section of your site.

## Troubleshooting

If your companion ad isn't serving, check the following:

- Does your Flight contain only the companion ad?
- Are the placements you generated code for the same size as the Creatives in your Flight?
- Is the correct Flight winning the impression? Use [Priorities](https://dev.kevel.co/v1.0/docs/priorities) to ensure the Companion Flight would win if eligible.
- **Ad Codes:** Are all the companion placements included in the same `ados.js` ad call script in the `<head>` section? Companion ads require a single multi-placement request to work.
- Does your ad request include at least as many compatible placements as there are ads in the companion flight? If the flight has more ads than compatible placements, none will serve.

## Advertiser Placement Limits

Setting a **placement limit** on an advertiser limits how often ads from that advertiser will appear in an ad request.

To add a placement limit for an advertiser:

1. Go to **Campaigns** --\> **Advertisers** --\> Advertiser Name --> **Settings** Tab
2. Enter a limit under "Limit placements per request"
3. Click "Save"

To remove a placement limit, set the placement limit to 0. This means the advertiser's ads can serve in a request for an unlimited number of placements.

Updated 3 months ago
