How to use Geo Controller inside JavaScript?

JavaScript is enabled from version 5.2.0. In JavaScript you have 2 ways to get geo data from our plugin, using `cf.geoplugin` or `window.cfgeo` objects. This 2 objects contain all geo informations from our plugin and is available inside public and admin area.

// Look in your console for all available objects

// you can use this everywhere you want
var city =,
    state = window.cfgeo.state,
    country =,
    ip = window.cfgeo.ip;

About the author


Lost your password? Register


Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our privacy policy.

Lost your password? Login