Tag Manager configuration

I’m using Cloudflare with Wordpress, and the Google Tag Manager script loads slowly (approx. 20/30 seconds). In addition to Cloudflare, I use a caching plugin that allows JavaScript to be delayed. I have eliminated the calls to the Tag Manager libraries from said plugin, does Cloudflare also have an option of this type that I must configure?

If the loading of these libraries is delayed, does it affect the data reflected in Analytics such as visit time, transition between pages, time spent between pages or even the registration of the session?

What I need is to record each visit correctly and in real time without any measurement error on the panels.

Is the GTM script located inside <head>..</head> or?
Any other scripts loading before it?
Is Rocket Loader option being enabled at Cloudflare dashboard for your domain?

May I ask how did you measure it?

Hi fritexvz, thanks for answering.

  1. Yes, GTM script is located inside head and body tags as Google recommends

  2. No scripts loaded before it

  3. No, I’m not using Rocket Loader

  4. I measured the time using F12 Developer Tools (Chrome)

Since I eliminated the rules from cache plugin, GTM loads immediately. But I want to know if I should make an additional configuration in Cloudflare. Thanks.