/o//commerce-media/accounts/-1/images/18464454?download=true

Geo Location Services
Icon
DXP App
18464404
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 http://dev.maxmind.com/geoip/geoip2/geolite2/#Downloads 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">
Liferay.Service(
'/geo-location-services-portlet.geolocations/get-location',
{
IP: '8.8.8.8'
},
function(obj) {
alert(obj);
}
);
</script>

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/8.8.8.8", function(data, status) {
alert(data);
});
</script>
DEVELOPER
Rivet Logic Corporation
DEVELOPER
7/8/14 12:00 AM
Published date
July 8, 2014
Published Date
7/8/14 12:00 AM
SUPPORTED OFFERINGS
Self-Hosted, Self-Managed
Supported Versions
6.2
Resource Requirements
Edition
CE, EE
PRICE
Free
help & support
Terms & Conditions
SHARE LINK
Copy & Share Link

HTML Example

A paragraph is a self-contained unit of a discourse in writing dealing with a particular point or idea. Paragraphs are usually an expected part of formal writing, used to organize longer prose.