Geo Location Services

The Geo Location Services is an app that once installed offers a web service that receives an IP value and returns a two-character ISO 3166-1 country code in which that IP resides. With this app you can enable Geo IP functionalities in your apps. For example you can choose which content to show to your users based on the country they are located.

This app uses Maxmind GeoLite2 Country CSV database. You download that database from here and then use an interface that is also provided by this app to import that data into Liferay. You won't need to use an external service anymore to provide Geo IP functionalities in your portal.

To use this service in your portlets or templates use this code:
<script type="text/javascript">
IP: ''
function(obj) {

or if you prefer to use JQuery use this one:
<script type="text/javascript">
$.get( "/api/jsonws/geo-location-services-portlet.geolocations/get-location/IP/", function(data, status) {

Customers Who Viewed This Also Bought