# Troubleshooting

If you notice that a tag is slowing down your pages, please try the following:

* Have the tag load after the **DOM Loaded** event. Caution: not all tags are compatible with this method and the more you delay a tag’s execution the more you loose data in your reports.

This code block allows calling a tag during the **DOM Loaded** event:

tC\_ready = function(){

// Code du tag

}

if (window\.addEventListener)

window\.addEventListener(‘load’, tC\_ready, false)

else if (window\.attachEvent)

window\.attachEvent(‘onload’, tC\_ready)

* Get in touch with the tag’s editor and request they improve their tag in terms of size or server response. Note: it is possible to include the tag’s JavaScript file in the Commanders Act container while on the “EDIT” tab from the TagCommander interface.

![](https://2673302412-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdtBYhZj-wxWhoZaUXI%2F-LqejXa5Q46KBI9N5ADX%2F-LqejtB_ozwuw14dlUiv%2Fccls_0-1030x578%5B1%5D.png?alt=media\&token=9894007f-2749-4ef5-856e-99f347baaf2f)

* Sample the tag from the “**RULES**” tab from the TagCommander interface. This will improve the average loading time of your site’s pages.

![](https://2673302412-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdtBYhZj-wxWhoZaUXI%2F-LqejXa5Q46KBI9N5ADX%2F-Lqek4nqH6ExYhDq-dm1%2FTagPerf14%5B1%5D.png?alt=media\&token=813736d4-8f0e-4b34-85ca-d36117373353)

* Shifting the tag’s execution order from the “GENERATION” (1) tab from the TagCommander interface (place the one taking longer to load at the end of the queue).

![](https://2673302412-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdtBYhZj-wxWhoZaUXI%2F-LqejXa5Q46KBI9N5ADX%2F-LqekBb-sunYtLOE03uz%2FTagPerf15%5B1%5D.png?alt=media\&token=90114fa0-e0a9-4ea2-b9ff-58de408a4940)

* Use a timeout on your tags from the “GENERATION” (1) tab from the TagCommander interface. This feature interrupts the tag’s execution if it takes too long to load.

![](https://2673302412-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdtBYhZj-wxWhoZaUXI%2F-LqejXa5Q46KBI9N5ADX%2F-LqekIv7oncZK0BpMmjm%2FTagPerf16%5B1%5D.png?alt=media\&token=9c3c0415-26d2-4e73-a196-d9a71fbebcc7)

* Deactivate the tag from the “GENERATION” (1) tab from the TagCommander interface (1)

![](https://2673302412-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdtBYhZj-wxWhoZaUXI%2F-LqejXa5Q46KBI9N5ADX%2F-LqekNnvr0_kQ6751uow%2FTagPerf17%5B1%5D.png?alt=media\&token=3efda8e4-740c-450a-be87-b24169bc5ba4)

* Use your tag in a **serverside** configuration (this entails activating an **additional** module from the TagCommander product, please contact your account manager or our Support Department for further information). Caution: not all tags are compatible with this method.

For more detailed information on how to set up these methods, please contact our Support Department (<support@commandersact.com>).
