client-side-location-info
Reactive icon

Client Side Location Info

Stable version 1.0.1 (Compatible with OutSystems 11)
Uploaded
 on 02 November 2024
 by 
0.0
 (0 ratings)
client-side-location-info

Client Side Location Info

Documentation
1.0.1

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:

  1. 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.

  2. Using the Client Action:

    • In your application, add a reference to the Client Action called GetClientLocation found in the ClientSideLocationInfo_IS module.
    • You can use this Client Action on any screen or flow to obtain the client's location. When executed, it will return geolocation data that can be used to personalize the user's experience.
  3. 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:

  • You can use the client's city to display location-specific content.
  • Store the user's location in a database for geographic analysis.

Benefits:

  • Personalization of the user experience based on their geographic location.
  • Easy integration into any OutSystems application thanks to the use of a pre-configured Client Action.

1.0.0

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. 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:

  1. LocationScript (JS): Executes a JavaScript script that makes a call to the geolocation API to obtain the IP address and geographic data.
  2. Assignment: The data obtained is stored in variables or processed according to the application's requirements.
  3. End of Process: The flow completes once the geolocation information has been obtained and processed.

Instructions for Use:

  1. 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.

  2. 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.

  3. Using the Client Action:

    • In your application, add a reference to the Client Action called GetClientLocation found in the ClientSideLocationInfo_IS module.
    • You can use this Client Action on any screen or flow to obtain the client's location. When executed, it will return geolocation data that can be used to personalize the user's experience.
  4. 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:

  • You can use the client's city to display location-specific content.
  • Store the user's location in a database for geographic analysis.

Benefits:

  • Personalization of the user experience based on their geographic location.
  • Easy integration into any OutSystems application thanks to the use of a pre-configured Client Action.