# IP-Address

## `this.package.ip` Variable

The `this.package.ip` variable provides access to the **client’s IP address** within the server-side variable runtime in JENTIS.

***

### Purpose

This variable is used to retrieve the **IP address of the user** making the request. It can be used for:

* **Geolocation purposes**
* **Enrichment logic**
* **Traffic analysis**

***

### Anonymization

> **By default**, the **last octet of the IP address is anonymized** to ensure privacy compliance and data minimization.\
> For example:\
> `123.123.123.84` → `123.123.123.1`

***

### Variable Definition

| Property          | Description                            |
| ----------------- | -------------------------------------- |
| **Variable Name** | `this.package.ip`                      |
| **Type**          | `string`                               |
| **Scope**         | Available in **server-side variables** |
| **Default Value** | Anonymized IP (e.g., `123.123.123.1`)  |

***

### Example Usage

```js
async function() {
    var x = this.package.ip; // e.g., "123.123.123.1"
    return x;
}
```

In this example, the variable retrieves the user's IP address and returns it. This value can then be used in further logic or sent to a third-party endpoint if needed.

***

### Notes

* You do **not need to request or calculate the IP manually** — it’s automatically populated by the JENTIS server.
* The default anonymization helps ensure compliance with **data privacy regulations** like GDPR.

***

### Summary

`this.package.ip` gives you access to a user's IP address in a privacy-conscious way, making it a useful building block for geo-based logic, analytics enrichment, and other server-side tracking scenarios within JENTIS.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.jentis.com/developer-guide/variables/server-side-variables/public-function-scope/ip-address.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
