# Creative Tokens

### **Overview**

In Adgebra’s ad serving platform, adgebra provides a **dynamic token replacement** feature that allows advertisers to pass tracking or contextual information through their **Landing Page URLs (LPUs)** or **ad copy headlines**.\
This is useful for campaign analytics, attribution, personalization, and downstream tracking.

Advertisers can insert predefined tokens in the Landing Page URL of the ad copy. When the ad is rendered and clicked, Adgebra automatically replaces these tokens with actual values related to the ad request, click, or user context.

### **Purpose of Token Replacement**

* **Campaign & Creative Tracking:**\
  Identify the exact campaign, creative, and placement responsible for the traffic.
* **User Context Personalization:**\
  Pass user-specific data such as IP, location, or device type for personalization or attribution.
* **Performance Analytics:**\
  Enable accurate reporting of bid prices, conversion IDs, or referral sources.

### **How It Works**

1. **Token Insertion:**\
   While creating the ad copy in adding the LPU, the advertiser inserts tokens in the URL or content.
2. **Ad Rendering & Click:**\
   When a user views the ad, tokens remain untouched. When the user clicks, tokens in the LPU are **dynamically replaced** at runtime.
3. **Redirection:**\
   The user is redirected to the landing page with actual values substituted in the URL.

### **Supported Tokens**

| **Token**       | **Description**                                                                 | **Example Value**                 |
| --------------- | ------------------------------------------------------------------------------- | --------------------------------- |
| `${placement}`  | Placement or site name where the ad is served.                                  | `ONIN_oneindia.com_Web`           |
| `${creativeId}` | Unique ID of the creative being served.                                         | `12345`                           |
| `${campaignId}` | Campaign ID to identify the campaign.                                           | `7890`                            |
| `${brandId}`    | Brand ID associated with the ad.                                                | `456`                             |
| `${refURL}`     | Referrer URL or source page URL from where the ad was clicked.                  | `https://www.example.com/article` |
| `${IP}`         | User's IP address at the time of the click.                                     | `192.168.1.10`                    |
| `${Price}`      | Actual bid price (cpc) associated with the campaign at click time.              | `2.50`                            |
| `${langId}`     | Language name of the creative ad copy.                                          | `Hindi`                           |
| `${ConvId}`     | Unique Conversion ID generated for click tracking.                              | `IID_123421212222455`             |
| `${location}`   | User’s geo-location (city or region). Can be used in LPU or ad headline.        | `Mumbai`                          |
| `${device}`     | Device type from which the click occurred. Possible values: `Desktop`, `Mobile` | `Mobile`                          |

### **Example Use Case**

#### **Landing Page URL Before Replacement:**

```
https://www.example.com/landing?camp=${campaignId}&crid=${creativeId}&plc=${placement}&ip=${IP}&price=${Price}&city=${location}&dev=${device}
```

#### **Landing Page URL After Replacement:**

```
https://www.example.com/landing?camp=7890&crid=12345&plc=ONIN_oneindia.com_web&ip=192.168.1.10&price=0.0250&city=Mumbai&dev=Mobile
```

***

### **Use in Ad Copy Headline (Location Token)**

Advertisers can personalize **headlines** using `${location}` token.

#### **Example:**

**Headline Setup:**

```
Best Offers in ${location} - Shop Now!
```

**Rendered Headline (User in Pune):**

```
Best Offers in Pune - Shop Now!
```

### **Notes**

* **Case Sensitivity:** Tokens are **case-sensitive**. Use exactly as specified.
* **Encoding:** All replaced values are **URL-encoded** to ensure safe transmission.
* **Fallbacks:** If a value is unavailable, the token will be replaced with an empty string unless a fallback mechanism is set in the platform (optional).
* **Security:** Sensitive data, like IP, is shared based on compliance and agreements with the publisher/advertiser.


---

# 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://help.adgebra.co/getting-started/publish-your-docs-5/creative-tokens.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.
