Obtaining IP Address

From mkMob Developer Wiki
Jump to: navigation, search

The IP Address is used for location detection and subsequently for fraud checking on impressions and clicks. This applies to all our ad endpoints (banner, video).

The Ad Server will first check the source of the ad request. When the ad request source is one of:

  • JavaScript Ad Tag
  • Android App
  • iOS App

the fetch method will be used.

When ad request source is of:

  • API

the request method will be used.

The fetch method looks at the HTTP_X_FORWARDED_FOR header, then the REMOTE_ADDR setting (the source IP of the HTTP request itself) in this sequence. The first one present and valid will be picked.

The request method looks at the mk-carrier= request parameter and picks it if valid.

For more information on our Ad Request API parameters click here.

Valid IP addresses are those which are not in private nor reserved ranges.