# Add a New Transformer (Server)

## Introduction&#x20;

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

## Procedure

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

**Step 1:** In the navigation panel, click ***Transformers*****.**

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

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

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

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

**Note**: The Function name must always start with an alphabet, and can only contain letters, numbers and underscores.

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

**Step 4:** In the ***Description*** field, enter an appropriate description.

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

**Step 5:** Under the ***Function Arguments*** field, click **Add&#x20;*****Arguments*****.**

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

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

<figure><img src="/files/8NGjWg0EY420GjftYl8I" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/7SmQ4OF2XIGrWe97qDz0" alt=""><figcaption></figcaption></figure>

The ***Select Data Element*****&#x20;panel** opens on the right side.

Two tabs are available:

* User-defined
* Default

You can select a data element from these tabs or use the search bar.

<figure><img src="/files/4FqTlLaphuAQM3o1hhkZ" 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/5m0zscyHFmoIkD6Cnwb7" alt=""><figcaption></figcaption></figure>

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

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

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

**Step 5.3:** The following checkboxes are available:

* Mandatory: Select this checkbox to make the argument required.
* URL Encode: Select this checkbox to encode the value for safe URL transmission.
* Hash (SHA256): Select this checkbox to hash the value using the SHA256 algorithm.

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

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

**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/codeserver.png)

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

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

<figure><img src="/files/gdowqKoitg76KsGVfbcA" 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/lTEgQWaZiycoP5sPOieN" alt=""><figcaption></figcaption></figure>

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

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

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

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

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

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDMDmegqZUJFhJhF4JQG%2Fuploads%2FghtPex7zk2Yz4Pg6ZDh4%2FAdd%20a%20New%20Transformer%20(Server).mp4?alt=media&token=a405af97-42a2-4d95-8b71-3d4a74ce345c>" %}


---

# 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-server.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.
