# Keyword Conversion

### What are keyword conversions?

Keyword conversions is a feature where you can map keywords to custom conversions. In a Purchase event, if we see any mapped keyword present in the fields of the event payload (see below) after we transform them, we fire the mapped custom conversion.&#x20;

E.g. if keyword `shirt` is present in `contents.title`, we fire the mapped custom conversion of that keyword.

### Transform payload fields <a href="#transform" id="transform"></a>

When looking for keywords, we are considering the following fields in the payload:

* `contents.title`
* `contents.brand`
* `contents.description`
* `keywords`

When transforming, we will remove punctuations, replace word split characters with spaces, changes text to lower case etc.,&#x20;

#### Transformation:

1. **Text is converted to lowercase**
   * Ensures consistent normalization
2. **Word-contract characters** (`'`, `_`, `-`) are **removed**
   * Words may merge together
   * Example: `this-is` → `thisis`
3. **Word-split characters** (`\s , . ! ? + " ; : |`) are **replaced with a single space**
   * Multiple consecutive separators collapse into one space
4. **Leading and trailing spaces** are trimmed

**Example:**

{% hint style="info" %}
**Input**

`Hello.World_THIS-is|A"Test!!! Don't+Split;Here:Now`
{% endhint %}

{% hint style="success" %}
**Output**

`hello worldthisis a test dont split here now`
{% endhint %}

### How to create a keyword conversion mapping? <a href="#how" id="how"></a>

Once you know the keyword that can be used, please go to the plugins page, select the plugin that you want to add keyword conversion mapping, add keyword in the left dropdown and the custom conversion name in the right dropdown and save the form.


---

# 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.edgetag.io/features/keyword-conversion.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.
