Do you want to buy traffic using XML-feeds? Then this article is for you! Here we will explain how to configure your own feeds in order to buy traffic using XML from 3rd-party ad servers. If you would like to sell traffic using XML-feeds, you might want to check out this article.

XML/JSON feeds (or server-side tags) are helpful if you need to establish communication between different ad servers in order to exchange ads.

Currently, Adserver.Online supports XML/JSON feeds for Direct Link, Popup, and Native ad formats. Besides, we support VAST ad format in XML format.

How to configure XML-feeds to buy traffic

Firstly, you need to enable server tag mode for a particular zone in its Advanced options. Otherwise feeds won't be working.

buy traffic using XML (server tags)

After that, you will find XML-endpoint available on the zone page.

buy traffic using XML (server tags)

Endpoint for Native and Direct links

https://srv.aso1.net/feed/bidder?zid={zone_id}&type={type}&ip={ip}&ref={referrer}&ua={user_agent}

Parameters

  • zidRequired. Zone ID.
  • typeRequired. Feed type: native or link or popup
  • ip – Required. IP address of the visitor.
  • ua – Required. User-Agent header from the visitor's HTTP request. Should be URL encoded.
  • page – Optional. URL of the page where ads from this zone will be displayed. You can use it to target an Ad. Should be URL encoded
  • referrer – Optional. URL of the page from where a visitor has come. You can use it to target an Ad. Should be URL encoded
  • vid – Optional but highly recommended. Visitor's unique identifier. You can use it for frequency capping.
  • lang – Optional. The language of the visitor. You should send it in an Accept-Language header format.
  • refid – Optional. Reference ID (subid). Up to 50 alphanumeric and special characters are allowed. You will be able to view statistics for each refid.
  • refid1refid9 – passthrough parameters. Therefore, no stats.
  • format – Optional. xml, xml_ak or json. xml by default. If you specify xml_ak then the response format will be compatible with AdKernel.

Endpoint for VAST

https://srv.aso1.net/vast?z={zone_id}&srv=1&ip={ip}&ua={user_agent}

Parameters

  • z – Required. Zone ID.
  • ip – Required. IP address of the visitor.
  • ua – Required. User-Agent header from visitor's HTTP request. Should be URL encoded.
  • page – Optional. URL of the page where ads from this zone will be displayed. You can use it to target an Ad. Should be URL encoded
  • referrer – Optional. URL of the page from where a visitor has come. You can use it to target an Ad. Should be URL encoded
  • vid – Optional but highly recommended. Visitor's unique identifier. You can use it for frequency capping.
  • lang – Optional. The language of the visitor. You should send it in an Accept-Language header format.
  • refid – Optional. Reference ID (subid). Up to 50 alphanumeric and special characters are allowed. You will be able to view statistics for each refid.
  • refid1refid9 – passthrough parameters. Therefore, no stats.

Response codes

  • 200 – Successful response
  • 204 – Empty response. No ads were found
  • 400 – Required parameters are missing
  • 404 – Zone is inactive or server tag is not enabled

How to buy traffic using XML – Examples

Please note, since Direct link and Popup are almost identical formats, we made examples for Direct link only.

Direct link endpoint with replaced placeholders

https://srv.aso1.net/feed/bidder?zid=34921&type=link&ip=82.131.34.62&ref=http%3A%2F%2Fexample.com&ua=Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10_14_2%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F71.0.3578.98+Safari%2F537.36

Response

<result>
  <clickUrl>
    http://track.aso1.net/link?z=34921&aid=87033&chk=1&ar=1.2345&_t=1560518320&_h=ff04f649a5a787eb40643f3afb9e084bef5e7e5d&r=1176314426
  </clickUrl>
  <bid>1.2345</bid>
  <pricingModel>CPM</pricingModel>
</result>

Direct link endpoint in AdKernel format

https://srv.aso1.net/feed/bidder?zid=34921&type=link&format=xml_ak&ip=82.131.34.62&ref=http%3A%2F%2Fexample.com&ua=Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10_14_2%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F71.0.3578.98+Safari%2F537.36

Response

<result>
<listing url="https://track.aso1.net/link?z=34921&aid=87033&chk=1&ar=1.2345000&_t=1580149671&_h=ec890e46a4604d3d4491bb7c6cc83b8de12c9a73&r=7707988290" bid="1.2345000"/>
</result>

Native endpoint with replaced placeholders

https://srv.aso1.net/feed/bidder?zid=36078&type=native&ip=82.131.34.62&ref=http%3A%2F%2Fexample.com&ua=Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10_14_2%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F71.0.3578.98+Safari%2F537.36

Response

<result>
  <title>Vertical template with image</title>
  <description>
     Lorem ipsum dolor sit amet.
  </description>
  <imageUrl>
    https://media.aso1.net/storage/c/c/c/ccc1c689555aaa3ff3beca0d85667251e21a9c5c.png
  </imageUrl>
  <cta>Buy now</cta>
  <clickUrl>
    https://track.aso1.net/click?cid=46489&aid=88505&fid=14&sid=2114&zid=36078&chk=1&_t=1549361756&_h=61e5bc024e456b8bfe419cdf4ff2d58d5cbadcba&r=336023696&clk=
  </clickUrl>
  <idad>88505</idad>
  <bid>0.017</bid>
  <pricingModel>CPM</pricingModel>
</result>

VAST endpoint with replaced placeholders

https://srv.aso1.net/vast?z=34668&srv=1&ip=82.131.34.62&ref=http%3A%2F%2Fexample.com&ua=Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10_14_2%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F71.0.3578.98+Safari%2F537.36

Response (partial)

<VAST version="3.0">
    <Ad id="camp_53514">
        <InLine>
            <AdSystem>ASO</AdSystem>
            <AdTitle>Demo ad</AdTitle>
            <Impression>
                <![CDATA[https://track.aso1.net/wtf.gif?cid=53514&aid=86723&sid=1342&zid=34668&chk=1&_t=1579181586&_h=bde3de2401e13903a7e534cf7037e8f16b92dd10&r=4236336224]]>
            </Impression>
            <Creatives>
                <Creative id="ad_86723">
                    <Linear skipoffset="00:00:10">
                        <Duration>00:00:14</Duration>
                        <TrackingEvents>
                            <Tracking event="start">
                                <![CDATA[ http://example.com?start ]]>
                            </Tracking>
                            <Tracking event="start">
                                <![CDATA[https://track.aso1.net/event?cid=53514&aid=86723&sid=1342&zid=34668&rid=1&tid=3&vid=47f57f39abe70d0ab2375802a22531e3&v=0&_h=c316fb6feaf717320d6beea94e2ba9927a51b499&r=9372909142]]>
                            </Tracking>
                        </TrackingEvents>
                        <VideoClicks>
                            <ClickThrough>
                                <![CDATA[https://track.aso1.net/click?cid=53514&aid=86723&fid=10&sid=1342&zid=34668&chk=1&_t=1579264386&_h=099238c56eb95a3fe260ad51a863b0b594d64cc3&r=3904057393&clk=]]>
                            </ClickThrough>
                        </VideoClicks>
                        <MediaFiles>
                            <MediaFile width="320" height="240" delivery="progressive" type="video/mp4" scalable="true" maintainAspectRatio="true">
                                <![CDATA[https://media.aso1.net/storage/5/f/b/5fbe128e24ea43de76184504aaefb0da53b29ba4.mp4]]>
                            </MediaFile>
                        </MediaFiles>
                    </Linear>
                </Creative>
            </Creatives>
        </InLine>
    </Ad>
</VAST> 

This article contains sufficient information on how to set up server-side tags and buy traffic using XML feeds. This feature might open new opportunities to your online business, therefore may help you to scale up.

IMPORTANT: If you plan to buy traffic using the XML feeds, you should completely understand that you're about to participate in an auction. In this case, each XML request generates an ad server request. But that doesn't necessarily mean that each of your XML requests will result in an impression. That happens due to the nature of an auction. When only XML requests that won the auction, can result in impressions.