How to use Platform Targeting with JSON API

This guide is an overview for implementing platform targeting via AdButler's JSON Ad API. For details on the platform targeting endpoints themselves, check our API documentation.

Platform targeting or device targeting lets you serve ads to certain audiences based on information about their system, such as their web browser, operating system, and device type. This allows ads to be catered to users whose platform matches that of the ad requirements.

For example, you can use platform targeting to serve ads for an iOS app only to users browsing on an iOS device. This way, the views and subsequent clicks will not be wasted on users who cannot download or purchase the app.

Platform targeting can be used on its own or with other targeting methods to make your target audience as specific as needed.

You don’t need to configure anything to implement platform targeting when using zone tags. To implement it on server-side ad requests, use AdButler's JSON API.

Requesting via GET

Add the following query parameters in this order into the request:

ua The user’s User Agent string (URL encoded). Roku4640X%2FDVP-7.70% 20(297.70E04154A)
sw The user’s device’s screen width. 1920
sh The user’s device’s screen height. 1080
spr The user’s device’s screen pixel ratio. 3

Example:;ID=171230;size=300x250;setID=373469;type=json;ua=Roku4640X%2FDVP-7.70%20(297.70E04154A);sw=1920;sh=1080;spr=3;click=CLICK MACRO PLACEHOLDER
Query parameters should be added before ;click=CLICK_MACRO_PLACEHOLDER to make sure the request is read correctly. Everything after the ;click= parameter is read as one value. If you do not have a click tracking link, we recommend removing the ;click= parameter. Doing so will also make it easier to add or remove other parameters without affecting your ad's click-throughs.

Requesting via POST

You can also implement platform targeting via POST.


"ID": 171230,
"size" : "300x250",
"setID": 373469,
"type" : "json",
"ua" : "Roku4640X%2FDVP-7.70%20(297.70E04154A)",
"sw": "1920",
"sh": "1080",
"spr": "3"

Can't find what you're looking for?

Send us an email

Visit the blog

For more ad serving tips, industry news and AdButler insights.