Installation
Instructions how to set up pointNG to a website.
Last updated
Was this helpful?
Instructions how to set up pointNG to a website.
Last updated
Was this helpful?
Step 1. Installation
Install the pointNG script on every page you wish to use pointNG by pasting it before closing </body> tag.
pointNG adds a 99kB JS bundle that includes all the features.
Step 2. Configuration
Below your tracking script, paste this code to initialize pointNG and set up your parameters
Use the 'level' parameter to choose the level you wish to identify your users' location. Options are 'continent', 'country', 'state' and 'city' To optimize speed, we recommend that you use the level that is necessary in your service.
If a user does not permit the use of GPS-data, pointNG uses the device time zone as default fallback to estimate the location.
To get your free API key, sign up for free .
After signing in, add your first website. This generates the needed API keys and whitelists your domain.
Insert your public API key to 'api_key' that is displayed on pointNG web-portal after you create a website. In test environment, please use the 'TEST Public API key'.
Success! Now you are ready to start using pointNG secure functions. Below is an example of a minimum implementation that prompts the user for location permission and console.logs the user location result.
That's it! Head over to the next section to learn how pointNG functions work.