Blog, Website & Page Publishing

OMoss
Member

Module that changes data based user location

SOLVE

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

0 Upvotes
2 Accepted solutions
albertsg
Solution
Guide

Module that changes data based user location

SOLVE

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

 

Hope this helps 🙂



Did my answer help you? Mark it as a solution

View solution in original post

Teun
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Module that changes data based user location

SOLVE

Hi @OMoss ,

 

This is a perfect usecase for a smart content rule where you use 'country' as the rule.

You can easily change the content per country.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

2 Replies 2
Teun
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Module that changes data based user location

SOLVE

Hi @OMoss ,

 

This is a perfect usecase for a smart content rule where you use 'country' as the rule.

You can easily change the content per country.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


albertsg
Solution
Guide

Module that changes data based user location

SOLVE

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

 

Hope this helps 🙂



Did my answer help you? Mark it as a solution