Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 1018 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 1018 Bytes

AmazonGeotarget

Build Status Coverage Status Greenkeeper badge

This script can detect user's location based on IPs and returns Amazon geotargeted URLs.

Usage

const amazonGeotargetService = new AmazonGeotargetService();
amazonGeotargetService.amazonGeotarget().then(res => console.log(res));  
  
// To use it with 'www.amazon.co.uk' as the default store
const amazonGeotargetService = new AmazonGeotargetService('www.amazon.co.uk');
amazonGeotargetService.amazonGeotarget().then(res => console.log(res));

Refer to index.html for usage on a webpage.

IP Sources

IP service providers: https://ipapi.co/
https://freegeoip.net/