# Setup guide

The TagPerformance tag must be included in **each and every one of your containers**.

If you have **many containers** on a given page and as many TagPerformance tags, only **one hit** containing information about your tags will be sent.

It is not necessary to place it in a particular order within your containers, as it will automatically execute two seconds after the DOM Loaded event, that is to say, after all the other tags have loaded.

* In the tag library, select the “Commanders Act – TagPerformance” tag.

![](/files/-Lqe_i3tbUl0LrAiyMkk)

* There is nothing to configure in the “EDIT” step: Generate a new container version and deploy it.

![](/files/-Lqe_qGRDFBAhDr0Usx4)

**Advanced – Customizing the “TagPerformance” tag:**

* It is **possible** to **force-measure a tag’s performance** (for example, that of a tag outside the container, that of a custom tag whose URL paths are not recognized by TagCommander or that of a tag that is not present in the TagCommander tag library). If you wish to measure a new tag’s performance, place the following code block in the commented line (4 (1) tC.tagPerf.customPatterns.push({label:’Solution A’,p:’domain\\.com.\*js\\.js’})

![](/files/-Lqea7uaYxvaRYQ8AUSn)

*Example:*

*tC.tagPerf.customPatterns.push({label:’exelate’,p:’loadm.exelator.com’});*

* You can also add **additional filters** (in addition to default filters page type, container, device, OS and browser). If you wish to add a custom filter, place the following code block in the commented line (4): tc\_vars\[“custom\_segment”] = #custom\_segment#;

Note: You can only add **one** additional filter.

*Example: to add a “page category” filter (tc\_vars\[“page\_cat1”]) :*

*tc\_vars\[“custom\_segment”] = tc\_vars\[“page\_cat1”];*

* Finally, you can **change the capturing method of the “Page Type” filter**, which is available in the reports. This filter is based on the tc\_vars\[“env\_template”] variable by default. If this variable is not available on your site, you can rely on a different variable by adding the following code block in the commented line (4) tc\_vars\[“env\_template”] = #page\_type#;

*Example: if you wish to replace tc\_vars\[“env\_template”] with tc\_vars\[“page\_type”] :*

*tc\_vars\[“env\_template”] = tc\_vars\[“page\_type”] ;*


---

# 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://community.commandersact.com/web-container/user-manual/tagperformance/setup-guide.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.
