Module Description:
This module allows you to obtain the user's geolocation using the ipgeolocation.io API. The main flow is based on executing a script that retrieves the client's location information from their IP address.
Instructions for Use:
Import the Module:The flow is encapsulated within a Client Action in the module named ClientSideLocationInfo_IS. To use it in your own application, ensure that this module is referenced in your application.
Using the Client Action:
Assigning Results:The data obtained from the script (such as city, country, latitude, and longitude) will be available for assignment to local variables or stored in a database as needed.
Example of Use:
Benefits:
This module allows you to obtain the user's geolocation using the ipgeolocation.io API. The main flow is based on executing a script that retrieves the client's location information from their IP address. Be sure to replace the default value of the GeoLocation_API_KEY variable with your own API key for proper functionality.
The flow follows these steps:
API Key Replacement:In the ClientSideLocationInfo_IS module, locate the client variable named GeoLocation_API_KEY. Replace its value with the API key you obtained when registering at ipgeolocation.io. This is necessary for the module to successfully make API calls.