# Geomarketing strategy

An announcement bar with a location-based message.

By Croct. Categories: framework, interface, language, use-case.

[Deploy](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcroct-tech%2Fvercel-template&project-name=location-geomarketing&repository-name=location-geomarketing&demo-title=Geomarketing+strategy&demo-description=An+announcement+bar+with+a+location-based+message.&demo-image=https%3A%2F%2Fcdn.croct.io%2Fassets%2Ftemplates%2Fcovers%2Fuse-case-location-geomarketing.png&external-id=croct%3A%2F%2Flocation%2Fgeomarketing&integration-ids=oac_cTQZ22CIXn5XgZXYk2nBwFdU) · [Source](https://github.com/croct-tech/templates/blob/master/templates/croct/location/geomarketing/)

## Installation

```sh
npx croct@latest use croct://location/geomarketing
```

# Introduction

This template shows how to implement **location-based content**
using [Croct slots](https://docs.croct.com/explanation/slot). It enables dynamic messages based on the visitor's **IP
location**, region, or locale, such as country, state, or city.

Built with the [announcement bar component](https://croct.com/templates/interface/component/announcement-bar), it can be
integrated into an existing project or used to scaffold a new [Next.js](https://nextjs.org/?utm_source=croct)
application.

It is a good alternative for IP geolocation APIs and ideal for geomarketing strategies, geo-targeted campaigns,
localized user experiences, and **IP-based customization**. Additionally, it is fully integrated with Croct, providing
you with a **headless CMS**, AB testing, and ready-to-use location-based personalization.

> [!NOTE Dynamic content]
> This template uses different implementations based on whether the [Dynamic values](https://docs.croct.com/reference/content/definition/introduction#dynamic-values) 
> feature is available in your workspace. 
> When enabled, it provides a simpler and more powerful approach to location-based messaging.

## Usage

To create a new project using this template, run:

```croct-cmd
croct use croct://location/geomarketing
```

You can customize the template by specifying options:

```croct-cmd
croct use croct://location/geomarketing --router=page
```

## Options

The following options are available for this template:

| Option        | Description                                      | Required | Default  |
|---------------|--------------------------------------------------|----------|----------|
| `projectName` | The name of the project.                         | No       | `my-app` |
| `version`     | The Next.js version to use.                      | No       | `latest` |
| `router`      | The router to use (`app` or `page`).             | No       | `app`    |
| `javascript`  | Whether to use JavaScript instead of TypeScript. | No       | `false`  |
