# Module that changes data based user location

**URL:** <https://community.hubspot.com/t/module-that-changes-data-based-user-location/61408>\
**Category:** Blog, Website & Page Publishing\
**Tags:** campaigns, marketplace-solutions-directory, calling, marketing\
**Created:** [July 21, 2022, 8:23am UTC](https://community.hubspot.com/t/module-that-changes-data-based-user-location/61408 "2022-07-21T08:23:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![OMoss](https://avatars.discourse-cdn.com/v4/letter/o/90db22/32.png) [@OMoss](https://community.hubspot.com/u/OMoss)\
**Post date:** [July 21, 2022, 8:23am UTC](https://community.hubspot.com/t/module-that-changes-data-based-user-location/61408/1 "2022-07-21T08:23:30Z")

</div>

Hi there Hubspot

Is there a way or a module I could purchase that would change the data within a module based on a user’s location.

For example if the user was from the USA, I would want the currency to display as USD or if the users was from France I would want the currency to change to EURO’s

Thanks

Olly

---

<div class="post-metadata">

**Author:** ![albertsg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/albertsg/32/99473_2.png) [@albertsg](https://community.hubspot.com/u/albertsg)\
**Post date:** [July 21, 2022, 1:15pm UTC](https://community.hubspot.com/t/module-that-changes-data-based-user-location/61408/2 "2022-07-21T13:15:07Z")

</div>

Hello @OMoss, this can be achieved using Javascript in your module.

Some ways to achieve it:

- Detect users’s browser language and display the currency accordingly. For example, if the user has the browser language set to ES-ES (Spain), you will show EUR. If he/she has it set to ES-MX (Mexico), you will show $ (pesos).

- Use Geolocation API to detect user’s location: [https://developer.mozilla.org/en-US/docs/Web/API/Geolocation\_API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API)

Hope this helps 🙂

---

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [July 25, 2022, 6:38pm UTC](https://community.hubspot.com/t/module-that-changes-data-based-user-location/61408/3 "2022-07-25T18:38:30Z")

</div>

Hi @OMoss ,

This is a perfect usecase for a [smart content rule](https://knowledge.hubspot.com/website-pages/create-and-manage-smart-content-rules) where you use ‘country’ as the rule.

You can easily change the content per country.
