> For the complete documentation index, see [llms.txt](https://docs.userlane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.userlane.com/intelligence/tags/create-a-tag-in-the-editor.md).

# Create a tag in the Editor

How to create a tag in the Editor, select and refine the target element, scope tracking to specific pages, and activate.

This article covers how to create a tag, select an element visually or by selector, scope tracking to specific pages, and activate it.

{% hint style="info" %}
For what tags are, how they differ from tasks, and when to use each, see [Tags](/intelligence/tags.md) in Intelligence.
{% endhint %}

A tag tracks clicks on a single element in the application. Where a task measures a multi-step workflow, a tag measures something smaller: whether people click a specific button, link, or menu item. Tags are built in the Editor[^1] and, once activated, produce analytics on the Tasks page in the portal under the **Tags** toggle.

## Create and activate a tag

{% stepper %}
{% step %}

#### Open the Editor and select Tags

Open the Editor on the application and select **Tags** in the sidebar.
{% endstep %}

{% step %}

#### Record a new tag

Click **Record a New Tag**. The visual picker activates and highlights elements as you hover over the application.
{% endstep %}

{% step %}

#### Select the target element and name the tag

Hover over the application until the element you want is highlighted, then click it.

If the element sits inside a dropdown, popover, or modal that closes on click, use the pause button to freeze the picker first. Open the dropdown or modal while the picker is paused, then resume and click the element.

Userlane generates a name from the element's visible text and its HTML type (for example, "Submit button" or "Accounts link"). Edit the name if needed. Duplicate names are rejected.
{% endstep %}

{% step %}

#### Refine the selector if needed

Every tag stores a selector[^2] that identifies the target element on the page. The visual picker generates it automatically, but it may need adjusting if it is too broad (matching more elements than intended) or too narrow (failing to match on some pages).

**Reselect Element** re-enters the visual picker and replaces the selector entirely. Use it when the original selection was wrong.

**Refine Selector** opens a dialog where you can edit the selector directly. An element-status indicator on the tag card shows whether the selector currently matches: green means at least one element matches on this page, and yellow means no match.

<div align="left" data-with-frame="true"><figure><img src="https://259567114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF6bxg8i3T6U4vZ3k7PHi%2Fuploads%2F3NdW14Gi3SJizaey8wo2%2Fwelcome%20tag.png?alt=media&#x26;token=2b5b06af-377c-4254-bc3c-2dbea641df32" alt="A tag card in the Editor with Reselect Element, Refine Selector, and the element-status indicator" width="375"><figcaption><p>A tag card with its selector options and element-status indicator.</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### Configure page scoping

By default, a tag tracks the element everywhere its selector matches. To limit tracking to specific pages, open the **Choose Where the Tag Is Tracked** dropdown under **Set page rules** and select a page rule[^3] instead of **Everywhere**. Page rules are created and managed in the portal, and the **Go to Page Rules** link opens that view directly.

Tags support page-based scoping only. Filtering by [audience](/administration/audiences.md) is available in the portal's analytics views after data is collected, not at the tag level.
{% endstep %}

{% step %}

#### Activate tracking

Click **Activate Tracking** at the bottom of the tag editing panel. The tag becomes public, and left clicks on the target element begin producing analytics events. The **Active** toggle in the tags list view switches on.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
If analytics are set to **Basic** for the application, tags cannot be activated. Switch to **Advanced** in the application's analytics settings.
{% endhint %}

## Deactivate or delete

The tag editing panel shows "This Tag will be tracked on **left click**" as a reminder that tags measure left clicks only.

To stop tracking, open the tag and click **Deactivate Tracking**. The tag returns to private. Historical data is preserved and remains visible on the Tasks page in the portal under the **Tags** toggle.

Deleting a tag removes it from the Editor entirely. Historical analytics remain accessible in the portal, but you can no longer edit or reactivate the tag.

## Relevant articles

{% content-ref url="/pages/TIIJZG1EKc8e2PJXZ87t" %}
[Tags](/intelligence/tags.md)
{% endcontent-ref %}

{% content-ref url="/pages/iSW1aAIFYuiVThZ8DMfM" %}
[Create a task in the Editor](/intelligence/tasks/create-a-task-in-the-editor.md)
{% endcontent-ref %}

{% content-ref url="/pages/CTLIhTmnhzt4Gwl4dF9h" %}
[Manage selectors](/assistance/in-app-guidance/creating-selectors/manage-selectors.md)
{% endcontent-ref %}

{% content-ref url="/pages/L1pTwQHW0TmAMoPDFhLR" %}
[Creating Contextual Actions](/assistance/in-app-guidance/creating-contextual-actions.md)
{% endcontent-ref %}

## FAQ

<details>

<summary>Can a tag track anything other than clicks?</summary>

No. Tags track left clicks only. The tag editing panel confirms this: "This Tag will be tracked on left click."

</details>

<details>

<summary>What happens if the selector does not match?</summary>

The element-status indicator shows yellow, and the tag does not fire on pages where the element is absent. Use **Refine Selector** to edit the selector, or **Reselect Element** to pick a different element entirely.

</details>

<details>

<summary>Can a tag be scoped to specific users?</summary>

No. An active tag tracks every user who clicks the target element. Filtering by audience is available in the portal's analytics views, not at the tag level.

</details>

<details>

<summary>What happens when a tag is deactivated?</summary>

Tracking stops. Historical data is preserved on the Tasks page in the portal. The tag returns to private and can be reactivated.

</details>

[^1]: The Editor is the workspace where Userlane content is built, separate from the portal where content is targeted and analytics are viewed.

[^2]: A selector is the rule Userlane uses to find an element on the page. If the application changes, the selector may need refining so it still matches.

[^3]: A page rule is a URL-based rule that defines a set of pages. Page rules are created in the portal and can be applied to tags, tasks, and other content types to control where they are active.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.userlane.com/intelligence/tags/create-a-tag-in-the-editor.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
