How can I serve multiple zones with a single server request?

This method is highly recommended if you have 3 or more ad placements on a page. It combines all ad calls into one and can speed up ad delivery significantly. For example: if your web page currently has 5 ad calls for 5 ad placements, it can be combined into one call and up to 500% faster overall.

How it works

Instead of requesting an ad from the ad server for each ad placement, this approach combines multiple calls into a single call to get all ads in one shot. Each ad placement then calls a JavaScript function to actually display the ad. Each ad is tracked separately for both impressions, clicks and other ad metrics. This method has 2 parts: preparing ads and displaying each ad.

Wizard

For your convenience, we have a wizard so that you can enter your own zones and it will generate the suitable ad tags for you. Please follow the instructions below:

Follow menu "Tools / Wizards"

Click on "Ad Tag Wizard"

Click on "Generate single-call serving code for multiple zones"

Enter the zone IDs. You can find the zone ID under the first column when viewing the list of zones from menu "Zones / All". Please enter only numbers. If you want to display multiple ads from a zone, follow the example on the form

Click button "Submit", the wizard will display the next 2 steps so you can paste the correct code into your website

Below is an example of the 2 steps that are generated from the wizard:

Step 1. Preparing Ads

This code gets ads from multiple zones in a single call to our ad server. It should be placed once into your HTML web page before the ad placements. It could be inside the HEAD element or just before the first ad placement of the page. In this example, the zone IDs are 1234, 2345 and 3456. You need to change the zone IDs to your own zone IDs.

Multiple Ads per Zone

You can also use a single request to fetch multiple ads from a zone. The format uses a hyphen "-" as the zone separator and a letter "x" follows by the number of ads. Example: zids=1234-6789x2. This ad tag gets one ad for zone #1234 and gets 2 ads for zone #6789.

See also

If you want to delay ad display until all page contents have finished loading or auto-refresh multiple zones together, you can use the ad defer solution.

Considerations

For the best performance, only include the zone IDs that you actually want to display to the web page. This will make sure you get the fastest speed and get all the ads needed for a page load. AdSpeed ad server runs through the whole ad selection process for each of the zone IDs listed. If you include extra zones without using them, time and resources will be wasted.

Other Articles in Ad Tag

This section describes the ad tag (serving code) with basic and advanced settings. It includes common ad serving setup instructions and answers frequently asked questions when integrating the ad tag into your site, blog or app.