In some cases, brands would like to know the location of a user so they can push it throughout the rest of their site. Locally’s Store Locator emits event information that can be utilized for this purpose.
How to access the user’s Locally location
- Add an event listener to your site that listens for LOCALLY_region_update event
- In the event, you should see a payload like this:
- You can use take the emitted event information and use as needed.