Transfix Presents

Visitor Price Segmentation API

Identify the countries your visitors are coming from and their income levels. Use this for dynamic pricing, retention, exit offers, compliance and more

API Documentation

Base URL

https://price-segmentation.transfix.workers.dev

Return JSON

{
  "gdp_per_capita":65504.783,
  "level":"high",
  "level_score":4,
  "ip":"216.58.214.14",
  "cookie_consent_required":true
}`

  • gdp_per_capita - Country GDP from IMF data, between 2019-2023.

  • level - Income classification level according to the World Bank. The possible values are 'high', 'upper middle', 'lower middle' and 'low'.

  • level_score - Numeric score corresponding to the level values. 4 is high, 1 is low.

  • ip - IP address of the visitor that was used.

  • cookie_consent_requrired - Whether this visitor's location requires cookie consent. Boolean

Language Implementations

Javascript / Typsescript

const url = 'https://price-segmentation.transfix.workers.dev';
const response = await fetch(url);
// don't forget to check for response.ok
console.log(await response.json());

Swift

guard let url = URL(string: "https://price-segmentation.transfix.workers.dev") else {
  print("Invalid URL")
  return
}
let task = URLSession.shared.dataTask(with: url) { data, response, error in
  if let data = data, let dataString = String(data: data, encoding: .utf8) {
    print(dataString)
  }
}
task.resume()

Kotlin

Thread {
  val url = URL("https://price-segmentation.transfix.workers.dev")
  (url.openConnection() as HttpURLConnection).apply {
    requestMethod = "GET"
    inputStream.bufferedReader().use {
      val response = it.readText()
      println(response)
    }
  }
}.start()

Use Cases

  • Dynamic Pricing

Maximize your revenue potential with geographically targeted dynamic pricing. Example use case: show a monthly price or an annual price by default to your users depending on their geo-location. Lower-income countries could see a more affordable monthly price by default, while high-income countries see the annual price.

  • Retention

It is far more cost-effective to retain existing customers than acquire new ones. Use geo-targeting to maximize customer retention, adjusting pricing strategies based on their location.

  • Exit Offers

Maximize conversion with exit offers. If a visitor is about to leave without converting, make them an exit offer based on their geo-located information. You got this far in bringing them into the door; do what you can to keep them in.

  • Compliance

If your visitors are from a non-EU country that does not require cookie consent or similar banners, then use geo-location information to minimize annoying overlays. A better visitor experience leads to better conversion.