> For the complete documentation index, see [llms.txt](https://server-side.docs.sirdata.net/sirdata-server-side/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://server-side.docs.sirdata.net/sirdata-server-side/english-1/f.a.q-server-side/performance/optimization-of-cmp-and-gtm-loading.md).

# Optimization of CMP and GTM Loading

Loading the CMP (Consent Management Platform) and GTM (Google Tag Manager) into a single script, as proposed by Sirdata, offers several advantages:

* **Preventing CMP Implementation Errors**: Integrating both tools into a single script ensures that the consent rules defined by the CMP are properly respected and applied, reducing the risk of configuration errors.
* **Better Script Ordering**: Combining the CMP, GTM, and Google Consent Mode V2 in one script ensures that scripts load and execute in the correct order, providing better management of user consent and tracking events.
* **Improved Web Performance**: Loading the CMP and GTM in a single script optimizes page load time, reduces the number of requests, and improves the overall performance of your website.

This method provides an efficient solution to maximize compliance and performance while simplifying the implementation of consent and tracking tools.
