# Tracking code too slow according to GTMetrix

**URL:** https://forum.mautic.org/t/tracking-code-too-slow-according-to-gtmetrix/8244
**Category:** Product Support
**Created:** [April 18, 2017, 3:21pm UTC](https://forum.mautic.org/t/tracking-code-too-slow-according-to-gtmetrix/8244 "2017-04-18T15:21:22Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![eplaku](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/eplaku/32/49_2.png) [@eplaku](https://forum.mautic.org/u/eplaku)
#### Post date: [April 18, 2017, 3:21pm UTC](https://forum.mautic.org/t/tracking-code-too-slow-according-to-gtmetrix/8244/1 "2017-04-18T15:21:22Z")

</div>

Hi everyone,  
  
  
  
I’ve been testing my site speed recently and one of the issues I’ve noticed was how slow the tracking code under “mtc.js” is too slow by several seconds.  
  
  
  
I’m hosted on A2Hosting  
  
Wordpress Site where I’ve embeded the tracking script in the template before the code.  
  
I also run my website using [CloudFlare.com](http://CloudFlare.com) as the CDN.  
  
  
  
However, GTMetrix is telling me that “[https://sfidabiznesi.com/cms/mtc.js](https://sfidabiznesi.com/cms/mtc.js)” is performing poorly, any advice?  
  
  
  
Thanks in advance,  
  
Elvis

---

<div class="post-metadata">

### Author: ![eplaku](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/eplaku/32/49_2.png) [@eplaku](https://forum.mautic.org/u/eplaku)
#### Post date: [April 18, 2017, 3:21pm UTC](https://forum.mautic.org/t/tracking-code-too-slow-according-to-gtmetrix/8244/2 "2017-04-18T15:21:22Z")

</div>

Hi everyone,

I’ve been testing my site speed recently and one of the issues I’ve noticed was how slow the tracking code under “mtc.js” is too slow by several seconds.

I’m hosted on A2Hosting  
Wordpress Site where I’ve embeded the tracking script in the template before the code.  
I also run my website using [CloudFlare.com](http://CloudFlare.com) as the CDN.

However, GTMetrix is telling me that “[https://sfidabiznesi.com/cms/mtc.js](https://sfidabiznesi.com/cms/mtc.js)” is performing poorly, any advice?

Thanks in advance,  
Elvis

---

<div class="post-metadata">

### Author: ![eplaku](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/eplaku/32/49_2.png) [@eplaku](https://forum.mautic.org/u/eplaku)
#### Post date: [April 18, 2017, 6:06pm UTC](https://forum.mautic.org/t/tracking-code-too-slow-according-to-gtmetrix/8244/3 "2017-04-18T18:06:35Z")

</div>

VPS, 4GB Ram

---

<div class="post-metadata">

### Author: ![eplaku](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/eplaku/32/49_2.png) [@eplaku](https://forum.mautic.org/u/eplaku)
#### Post date: [April 19, 2017, 11:30am UTC](https://forum.mautic.org/t/tracking-code-too-slow-according-to-gtmetrix/8244/4 "2017-04-19T11:30:22Z")

</div>

@MxyzptlkFishStix thank you for the screen shots, but I’m concerned that I don’t yet have a solution.

According to GTMetrix waterfall report, see here: [https://gtmetrix.com/reports/sfidabiznesi.com/KzPEbzcT](https://gtmetrix.com/reports/sfidabiznesi.com/KzPEbzcT)

There are two events related to Mautic (a post & a get event)  
 ![](https://img42.com/pUKAG)  
[https://img42.com/pUKAG](https://img42.com/pUKAG) - if image does not open.  
Any other suggestions?

---

<div class="post-metadata">

### Author: ![eplaku](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/eplaku/32/49_2.png) [@eplaku](https://forum.mautic.org/u/eplaku)
#### Post date: [April 19, 2017, 12:35pm UTC](https://forum.mautic.org/t/tracking-code-too-slow-according-to-gtmetrix/8244/5 "2017-04-19T12:35:45Z")

</div>

Hi again and thanks for the prompt reply.

I’ve disabled CloudFlare for the moment (it’s in development mode).

While, I’ve set some rules to have CF bypass the directory of Mautic completely.

Meanwhile, I’m wondering is I should move Mautic on another server altogether?

---

<div class="post-metadata">

### Author: ![eplaku](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/eplaku/32/49_2.png) [@eplaku](https://forum.mautic.org/u/eplaku)
#### Post date: [April 19, 2017, 6:53pm UTC](https://forum.mautic.org/t/tracking-code-too-slow-according-to-gtmetrix/8244/6 "2017-04-19T18:53:54Z")

</div>

Hi,  
I don’t think that that is the issue at all. Other scripts pass through CloudFlare but their response rate is not that huge. I’m guessing that the Mautic database may be underperforming though I don’t see any issue from the log file.

---

<div class="post-metadata">

### Author: ![eplaku](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/eplaku/32/49_2.png) [@eplaku](https://forum.mautic.org/u/eplaku)
#### Post date: [April 22, 2017, 10:08am UTC](https://forum.mautic.org/t/tracking-code-too-slow-according-to-gtmetrix/8244/7 "2017-04-22T10:08:22Z")

</div>

Cloudflare is off, but the issue persists ☹

---

<div class="post-metadata">

### Author: ![Petykemano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/petykemano/32/161_2.png) [@Petykemano](https://forum.mautic.org/u/Petykemano)
#### Post date: [May 11, 2017, 4:06pm UTC](https://forum.mautic.org/t/tracking-code-too-slow-according-to-gtmetrix/8244/8 "2017-05-11T16:06:44Z")

</div>

Try turning opcache ON.  
Without opcache I measured some 4s loading time for mtc.js, with opcache it went down to 0.4 But these numbers are affected by server load.

Anyway I wonder what dynamic content could be in mtc.js that needs to be served by php.
