# 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 Commanders Act interface.

  <figure><img src="/files/MElaaajsxy0msiHmu8yM" alt=""><figcaption></figcaption></figure>
* Sample the tag from the “**RULES**” tab from the Commanders Act interface. This will improve the average loading time of your site’s pages.

  <figure><img src="/files/3vuBfb9yHwoObufo76aS" alt=""><figcaption></figcaption></figure>
* Shifting the tag’s execution order from the “GENERATION” tab from the Commanders Act interface (place the one taking longer to load at the end of the queue).\\

  <figure><img src="/files/WhLplgl4Rv69N40srKoC" alt=""><figcaption></figcaption></figure>
* Use a timeout on your tags from the “GENERATION” tab from the Commanders Act interface. This feature interrupts the tag’s execution if it takes too long to load.

  <figure><img src="/files/KgQqm9HvR8bPx5E11kCu" alt=""><figcaption></figcaption></figure>
* Deactivate the tag from the “GENERATION” tab from the Commanders Act interface\
  \\

  <figure><img src="/files/9qAzzOntxD5SIgekmTBk" alt=""><figcaption></figcaption></figure>
* Use your tag in a **serverside** configuration (this entails activating an **additional** module from the Commanders Act 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>).


---

# 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://doc.commandersact.com/features/sources/sources-catalog/web/containers/user-guides-for-browser-side-platform/tagperformance/troubleshooting.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.
