> For the complete documentation index, see [llms.txt](https://community.commandersact.com/tagcommander/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community.commandersact.com/tagcommander/user-manual/tagperformance/setup-guide.md).

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

![](https://2813015996-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdtBYhZj-wxWhoZaUXI%2F-Lqe_RccMutRvR5OKeKw%2F-Lqe_i3tbUl0LrAiyMkk%2FTagPerf%5B1%5D.png?alt=media\&token=5d019bb1-04d0-440c-95c8-3a15786beaa3)

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

![](https://2813015996-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdtBYhZj-wxWhoZaUXI%2F-Lqe_RccMutRvR5OKeKw%2F-Lqe_qGRDFBAhDr0Usx4%2Ftag_1%5B1%5D.png?alt=media\&token=5bf796c2-db11-4d8f-bce0-fc9bc355a935)

**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’})

![](https://2813015996-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdtBYhZj-wxWhoZaUXI%2F-Lqe_RccMutRvR5OKeKw%2F-Lqea7uaYxvaRYQ8AUSn%2Ftag_2%5B1%5D.png?alt=media\&token=53846366-ecea-4c13-99fe-c4ac81e848ef)

*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”] ;*
