# Workspace

The **Netmera Tag Manager** allows you to capture and manage user interactions on your website or application without additional coding. By using **Tags**, **Triggers**, and **Variables**, you can define the actions to track, the conditions under which they should fire, and the data they should carry.

This section explains how to work with the **Workspace** components: **Tags**, **Triggers**, and **Variables**.

### Workspace Overview

The **Workspace** is the main area where you create and manage your Tag Manager configuration. It contains three key elements:

* **Tags**: Define what should happen (e.g., fire a Netmera Event, inject custom HTML).
* **Triggers**: Define when a tag should fire (e.g., all pages, specific page view, DOM ready).
* **Variables**: Provide dynamic values that can be used in triggers and tags (e.g., `Page URL`, `Click ID`).

Each workspace change can be tested in **Preview** mode and finalized with **Publish**.

### Tags

Tags represent the actions you want Netmera to perform. They can be:

* **Netmera Events**: Predefined or custom events that are logged to Netmera.
* **Custom HTML/JavaScript**: Code snippets injected into your site.

#### Creating a Tag

1. Navigate to **Tag Manager > Workspace > Tags**.
2. Click **Create Tag**.
3. Enter a **Name** and select a **Type** (e.g., Netmera Event, Custom HTML).
4. Attach one or more **Triggers** to define when the tag will fire.
5. Save your tag.

#### Example Tags

* `screenview` (Netmera Event triggered on all pages).
* `Purchase Event Web` (fires when a purchase occurs).
* `add banner` (Custom HTML tag that runs when a banner is added).

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2FC6ljshF0nzR3VQiEFe3C%2FScreenshot%202025-09-22%20at%2011.24.00.png?alt=media&#x26;token=bd24a35d-9365-4cae-94e1-9c560ec0944d" alt=""><figcaption></figcaption></figure>

### Triggers

Triggers determine **when** a tag should fire. A trigger can be built-in or custom.

* **Built-in triggers**: Provided by Netmera (e.g., All Pages).
* **Custom triggers**: Defined by the user (e.g., a specific DOM Ready event).

#### Creating a Trigger

1. Go to **Tag Manager > Workspace > Triggers**.
2. Click **Create Trigger** or **Import Built-in Trigger**.
3. Choose the **Trigger Type** (Page View, DOM Ready, Click, etc.).
4. Name your trigger and save it.
5. Attach it to one or more tags.

#### Example Triggers

* `All Pages` (built-in, fires on every page view).
* `All Page View` (custom page view trigger).
* `banneradd` (fires when DOM is ready and banner code executes).

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2Fj6YbYU5IDaxZkz3goMtt%2FScreenshot%202025-09-22%20at%2011.24.23.png?alt=media&#x26;token=0349b78b-7fe3-47e0-aee3-b05571c27158" alt=""><figcaption></figcaption></figure>

### Variables

Variables provide dynamic data that can be used inside triggers and tags.

* **Built-in variables**: Common properties like Page URL, Page Path, Click ID, Time on Site.
* **Custom variables**: User-defined values, such as a specific banner variable.

#### Creating a Variable

1. Go to **Tag Manager > Workspace > Variables**.
2. Click **Create Variable** or **Import Built-in Variable**.
3. Choose the variable type (e.g., Data Layer Variable, URL, Custom JavaScript).
4. Save and attach to triggers or tags.

<figure><img src="https://1642824329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX6uilbEAw42gqsudlclY%2Fuploads%2Ffx5KSbhu7mbz0e5qQGn6%2FScreenshot%202025-09-22%20at%2011.24.44.png?alt=media&#x26;token=85f20af6-2eb5-4b88-9e17-fbed7ea59f1f" alt=""><figcaption></figcaption></figure>

#### Example Variables

* `Click Classes` (data layer variable).
* `Page URL` (used for page view triggers).
* `addBannerVar` (custom URL variable attached to the `banneradd` trigger).

### Publishing Changes

After configuring tags, triggers, and variables:

1. Click **Preview** to test the setup before going live.
2. Once verified, click **Publish** to activate the changes in your live environment.
