# get user geolocation

**URL:** <https://community.hubspot.com/t/get-user-geolocation/52839>\
**Category:** CMS Development\
**Created:** [March 9, 2022, 6:34pm UTC](https://community.hubspot.com/t/get-user-geolocation/52839 "2022-03-09T18:34:49Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mangelet](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mangelet/32/83031_2.png) [@mangelet](https://community.hubspot.com/u/mangelet)\
**Post date:** [March 10, 2022, 1:08pm UTC](https://community.hubspot.com/t/get-user-geolocation/52839/4 "2022-03-10T13:08:20Z")

</div>

@llopez1

**1) Smart content modules** display different versions of your content based on viewer category.

You can base your smart rules on the country. The country is determined by the IP address of the visitor.

**2) On a Contact record there is a field ‘IP Country’**, which automatically fills in a Country.

Consider using `{{contact.ip_country}}` in your templates. Then add conditional logic as you please.

---

_[View the full topic](https://community.hubspot.com/t/get-user-geolocation/52839)._
