# Add a New Transformer (Browser)

## Introduction

This document explains step by step how to add Transformers to the browser side.  All the information required for client-side or browser-side configuration is provided.

### Procedure

To add a new Transformer in Tag Manager, perform the following steps:

**Step 1:**  From the left navigation panel, select **Transformers**.

<figure><img src="/files/fbwJsOB8JM1ahtutmJkK" alt=""><figcaption></figcaption></figure>

**Step 2:** Click the **Add Transformer** drop-down and select **For Browser**.

<figure><img src="/files/hSZe373Rrse3DWmqkYZT" alt=""><figcaption></figcaption></figure>

**Step 3:** Under the **Info** section, enter the function name in the **Function Name field**.

<figure><img src="/files/IJzIQImGdE4OnvcTeJC1" alt=""><figcaption></figcaption></figure>

**Step 4:** Enter the Description in the **Description** field.

<figure><img src="/files/sYUNhlPdv9G8nVjqNPJk" alt=""><figcaption></figcaption></figure>

**Step 5:** In the ***Function Arguments*** section, click ***Add Agreement***.

<figure><img src="/files/DPVQWLC8qDezVfTaeoK3" alt=""><figcaption></figcaption></figure>

**Step 5.1:** In the ***Name*** field, enter the appropriate name.

<figure><img src="/files/hAEmdcNIYOrZex0urVKq" alt=""><figcaption></figcaption></figure>

**Step 5.2:** Under ***Value***, click ***Select Data Element***.

<figure><img src="/files/S2m5EL3s0qgZNuRUI1ZC" alt=""><figcaption></figcaption></figure>

**Step 5.3:** The *Select Data Element* panel opens on the right side. Two tabs are available — *User-defined* and *Default*. You can select a data element from these tabs or use the search bar to find one.

<figure><img src="/files/b7MRGE6c3SinhW3O5EYB" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/AU3CT6BUvAqtUhahKbDV" alt=""><figcaption></figcaption></figure>

**Note:** Click the selected argument data element value. The data element details will appear in the right panel.

<figure><img src="/files/DTiyKHGSN0q7BVRZqjXE" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/vfqkocHFo7ggRNsrvUpk" alt=""><figcaption></figcaption></figure>

Note: To clear the selected data element value, click the small **X** icon next to it.

<figure><img src="/files/gyeivPBa3eKwmukFmOXT" alt=""><figcaption></figcaption></figure>

**Step 5.4:** Select the checkboxes for ***Mandatory*** and *URL Encode*, if required.

<figure><img src="/files/riCqzCgCsGaDB8FESUcx" alt=""><figcaption></figcaption></figure>

**Note:** To delete the Argument, click the **Delete** icon on the right-hand corner of the screen.

<figure><img src="/files/KuelUmOo465DHJFaQ8Lr" alt=""><figcaption></figcaption></figure>

**Step 6:** To access the Argument, enter the code in the Code section. You can also Test the function using the Test Function tab on the right-hand corner of the screen.

**Step 7:** Click the **Full Screen** icon ![](/files/mVHtTJpF7Z0kEKfWkIfY) to expand the code and view it in full screen mode.

![](https://ingest-lab.netlify.app/images/transformersimages/code.png)

**Step 8:** Click **Test Function**. The **Test Function** panel opens.

<figure><img src="/files/kWWJy4KOoz7G4lTIbcnj" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/bAakr1WhzozGxOPVkVMC" alt=""><figcaption></figcaption></figure>

**Step 9:** Click the **Select** dropdown and choose an input type:

* **Number** — Use this option if your function requires a numeric input.
* **String** — Use this option if your function requires text input.
* **Boolean** — Use this option if your function requires a true/false value.
* **JSON** — Use this option if your function requires structured data in JSON format.

<figure><img src="/files/joPRAlmmni23N1vRHpFk" alt=""><figcaption></figcaption></figure>

**Step 10:** Enter the **Argument value** that corresponds to the selected input type.

<figure><img src="/files/rtJEN5ren2DjhC0tziwn" alt=""><figcaption></figcaption></figure>

**Step 11:** Navigate to the **Output** tab to view the result of the executed function.<br>

<figure><img src="/files/Vq11JoSvjQilgzKMimGC" alt=""><figcaption></figcaption></figure>

**Step 12:** Click **Save** to save the Transformers details.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2FHn9f3BPyOSIUbO0a559q%2FAdd%20a%20New%20Transformer%20(Browser).mp4?alt=media&token=3309b733-8fbc-4fc8-861b-136c334265a1>" %}


---

# 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.ingestlabs.com/tag-manager/transformers/add-a-new-transformer-browser.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.
