---
title: "Product update: new location variables for richer segmentation"
slug: "location-variables"
locale: "en-us"
description: "We've just rolled out a major upgrade to our location data, making it more structured, detailed, and versatile for location-based segmentation and personalization."
published_at: "2025-05-28"
updated_at: "2025-05-28"
image: "https://storage.googleapis.com/croct-assets-b931d070/blog/Location_variables_9f530ca708/Location_variables_9f530ca708.png"
authors: ["Juliana Amorim"]
category: "News"
tags: ["Segmentation","Location","Changelog"]
canonical: "https://blog.croct.com/post/location-variables"
---

# Product update: new location variables for richer segmentation

At Croct, we believe that great personalization starts with great context, and geolocation plays a key role in that. That's why we've just rolled out a major upgrade to our location data, making it more structured, detailed, and versatile for location-based segmentation and personalization.

Let's walk you through what's new, what's changed, and how you can start using it to craft even more relevant experiences.

## What's changing?

We've deprecated the `location's district` variable and standardized how geographic properties are structured to make them more expressive and intuitive to use. This change allows you to access more granular data, including both the name and code for each region, and opens the door for future new variables.

### Continent

This variable's structure changed, and now we have new aliases:

- `location's continent` is now an object with name and code, instead of a string
- Now you should use `location's continent's name` or `location's continentName`
- Besides the existing `locations continentCode`, now you can also use `location's continent's code`

### State or region

This variable's structure changed, and now we have new aliases:

- `location's state` is now an object with name and code, instead of a string
- Now you should use `location's state's name` or `location's stateName`
- Besides the existing `locations stateCode`, now you can also use `location's state's code`

Since `state` is an alias for `region`, you can choose your preferred notation form.

### City

This variable's structure changed, and now we have a new alias. Instead of a string, `location's city` is now an object with a name, so now you should use `location's city's name` or `location's cityName`.

## What's new?

We're adding powerful new variables to give you a richer understanding of your visitors.

### Geographic coordinates

When available, you will get precise location info for latitude and longitude:

```cql noLineNumber
location's coordinates' latitude     // 36.7783
location's coordinates' longitude    // 119.4179
```

Negative latitude means south, positive latitude means north, negative longitude means west, and positive longitude means east. So to segment people out of the northern and western hemispheres, you should use:

```cql noLineNumber
location's coordinates' latitude is greater than 0
and
location's coordinates' longitude is less than 0
```

### Currency information

Understanding your users' local currency for pricing or payment is extremely important when displaying products and plan prices. Now it is as easy as:

```cql noLineNumber
location's currency's name    // "US Dollar"
location's currency's code    // "USD"
```

### Phone code

If you work in the B2B business, you're probably used to contact and sales contact forms. For [phone number input fields](https://croct.com/templates/interface/form/react-phone-number-input), you can now automatically detect the user's location and pre-fill the appropriate country code and formatting.

```cql noLineNumber
location's phoneCode    // "+1"
```

### Languages

Understanding your users' local languages is as easy as:

```cql noLineNumber
location's languages    // ["en-ca", "fr-ca"]
```

### Elevation and population

Craft experiences based on geographic traits:

```cql noLineNumber
location's elevation     // 1500
location's population    // 100000
```

### Postal code

Useful for regional promotions or logistics:

```cql noLineNumber
location's postalCode    // "90210"
```

## Introducing location tags

This is the biggest update in the release! Semantic tags describe the type of place a user is in, making segmentation easier than ever.

Instead of dealing with complex geographic logic, you can now work with these meaningful labels:

- **Place:** urban, residential, rural, remote, park, island
- **Society:** government, politics, military, religion, education
- **Economy:** business, industry, agriculture
- **Infrastructure:** transport, facility, waterway, airport, road, railway, seaport
- **Sport:** fishing, surfing, swimming, hiking, skiing
- **Attraction:** entertainment, scenery, landmark, recreation, tourism
- **Nature:** mountain, lake, river, canyon, desert, ocean, coast, beach, forest
- **Weather:** warm, cold, snowy

If you run an e-commerce, for example, and want to segment users on the beach, it is now as simple as:

```cql noLineNumber
"beach" is in location's tags
location's tags include "beach"
```

> 💬 GeoNames
>
> Location information relies on data from [GeoNames](https://www.geonames.org), a free global geographical database trusted by companies like Apple, Microsoft, Accenture, BBC, New York Times, and others. Tags are categorized using their [feature codes](https://www.geonames.org/export/codes.html), meaning Croct has no control over how places are labeled.

## Start personalizing with richer context

These new variables are now available for every Croct account, even in the free plan!

Whether you're offering [location-based experiences](/post/location-playbook.md), [optimizing forms](https://croct.com/templates/interface/form/react-phone-number-input), or running AB tests for a specific location, you'll find these enhancements powerful and intuitive to use.

To explore all the new expressions, check our updated [location data reference](https://docs.croct.com/reference/cql/context#location).

Happy personalizing!
