Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Geolocation detection - IP2Location Integration

Avatar

Avatar
Ignite 1
Level 1
Jalandar
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Boost 1
View profile

Avatar
Ignite 1
Level 1
Jalandar
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Boost 1
View profile
Jalandar
Level 1

26-04-2016

Have any one integrated IP2location plugin with AEM 6.1 for Geolocation detection? If so can you please share some details on this.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,162 likes

Total Posts

6,273 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,162 likes

Total Posts

6,273 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

28-04-2016

Hi 

"Our use case is to identify the user location from where he is accessing website/mobile web and display shops nearest to his location"

I would not recommend you to use IP address to find the location, as it only gives you rough estimates, you can use "Geolocation" or "The Google Maps Geolocation API". There are many reliable other option that you can easily find on google.

 

"On using geoplugin I have following query. Can this be used for commercial purpose and will this be reliable "

The geoplugin was just an example shown to you so that you can implement ip to location via JavaScript. Reliability, i am not actually sure of. Please reach out to them to know exactly abut this. Link:- http://www.geoplugin.com/contact

 

"If we use IP2Location, how this can be deployed as an OSGi service in AEM and where IP2 database file can be stored in the infrastructure. Ref :http://www.ip2location.com/docs/ip2location-java-user-manual.pdf"

You can create a custom component which is reliable on third party jar. "IP2Location" provide jar libraries, you can use them as a library into a component.

Example of Creating a component using third party jars:- https://helpx.adobe.com/experience-manager/using/aem_wordpress.html

 

I hope this helps you.

Thanks and Regards

Kautuk Sahni

Answers (4)

Answers (4)

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,162 likes

Total Posts

6,273 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,162 likes

Total Posts

6,273 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

27-04-2016

Hi 

Can you please tell what exactly is your use case of using IP2location plugin ?

If the purpose if just to find out location from Ip address, then you can also try this Java Script plugin:-

Link:- https://helpx.adobe.com/experience-manager/using/custom-carousel-components.html (Create a custom component using third party JavaScript)

Link:- http://www.sitepoint.com/geo-location-2-lines-javascript/

Demo Code:- 

jQuery(document).ready(function($) {
    jQuery.getScript('http://www.geoplugin.net/javascript.gp', function() 
{
    var country = geoplugin_countryName();
    var zone = geoplugin_region();
    var district = geoplugin_city();
    console.log("Your location is: " + country + ", " + zone + ", " + district);
});
});

Following are the functions that can be called from the JavaScript.

function geoplugin_request() 
function geoplugin_status()
function geoplugin_credit()
function geoplugin_city() 
function geoplugin_region()
function geoplugin_regionCode()
function geoplugin_regionName() 
function geoplugin_areaCode() 
function geoplugin_dmaCode() 
function geoplugin_countryCode()
function geoplugin_countryName() 
function geoplugin_continentCode() 
function geoplugin_latitude() 
function geoplugin_longitude() 
function geoplugin_currencyCode() 
function geoplugin_currencySymbol() 
function geoplugin_currencySymbol_UTF8() 
function geoplugin_currencyConverter(amt, symbol)

I hope this would be helpful to you.

Thanks and Regards

Kautuk Sahni

Avatar

Avatar
Ignite 1
Level 1
Jalandar
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Boost 1
View profile

Avatar
Ignite 1
Level 1
Jalandar
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Boost 1
View profile
Jalandar
Level 1

28-04-2016

Thanks Kautuk.. Information provided above are helpful

Avatar

Avatar
Ignite 1
Level 1
Jalandar
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Boost 1
View profile

Avatar
Ignite 1
Level 1
Jalandar
Level 1

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 1
Boost 1
View profile
Jalandar
Level 1

28-04-2016

Hi Kautuk Sahni,

Thanks for your reply. This is useful and simple way to detect Geolocation

Our use case is to identify the user location from where he is accessing website/mobile web and display shops nearest to his location (We have database of shops along with Zipcode and location coordinates)

On using geoplugin I have following query. Can this be used for commercial purpose and will this be reliable 

If we use IP2Location, how this can be deployed as an OSGi service in AEM and where IP2 database file can be stored in the infrastructure. Ref :http://www.ip2location.com/docs/ip2location-java-user-manual.pdf

Thanks,

Jalandar

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

26-04-2016

I am asking internal Adobe AEM people.