# Tracking Code (mtc.js) very slow

**URL:** <https://forum.mautic.org/t/tracking-code-mtc-js-very-slow/14292>\
**Category:** Product Support\
**Created:** [May 12, 2020, 6:40am UTC](https://forum.mautic.org/t/tracking-code-mtc-js-very-slow/14292 "2020-05-12T06:40:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thatoneguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/thatoneguy/32/2131_2.png) [@thatoneguy](https://forum.mautic.org/u/thatoneguy)\
**Post date:** [May 12, 2020, 6:40am UTC](https://forum.mautic.org/t/tracking-code-mtc-js-very-slow/14292/1 "2020-05-12T06:40:55Z")

</div>

**Your software**  
Running on cpanel webhost with 2GB RAM, setup as subdirectory of website public\_html/m/  
My Mautic version is: v2.16.2  
My PHP version is: 7.3.17

**Your problem**  
My problem is: mtc.js TTFB is very high generally where the website will have a 8ms TTFB Mautic will be 200ms - 4000ms, averaging \> 1s

These errors are showing in the log: none

Steps I have tried to fix the problem:  
I have disabled all CRON jobs to test impact and it had no impact.

```
**URL:** https://example.com/m/mtc.js
**Loaded By:** https://example.com/:174
**Host:** example.com
**IP:** xxx.xxx.xxx.xxx
**Error/Status Code:** 200
**Priority:** LOWEST
**Protocol:** HTTP/2
**HTTP/2 Stream:** 9, weight 147, depends on 0, EXCLUSIVE
**Request ID:** 78233.49
**Client Port:** 44208
**Discovered:** 0.385 s
**Request Start:** 0.385 s
**Time to First Byte:** 1202 ms
**Content Download:** 5 ms
**Bytes In (downloaded):** 47.8 KB
**Uncompressed Size:** 132.1 KB
**Bytes Out (uploaded):** 1.4 KB
```

---

<div class="post-metadata">

**Author:** ![msmerry](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/msmerry/32/13380_2.png) [@msmerry](https://forum.mautic.org/u/msmerry)\
**Post date:** [January 10, 2025, 12:18am UTC](https://forum.mautic.org/t/tracking-code-mtc-js-very-slow/14292/2 "2025-01-10T00:18:17Z")

</div>

Did you find a solution to this? I’ve got long TTFB on the mautic tracking script as well, and only about 20 contacts in my DB right now.

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [January 10, 2025, 10:44am UTC](https://forum.mautic.org/t/tracking-code-mtc-js-very-slow/14292/3 "2025-01-10T10:44:14Z")

</div>

There’s no ultimate answer on a First Byte speed.

The game is usually to identify the bottleneck and then to work on it.

To give you an idea, I’ve seen bad first byte because of a badly configured web server. badly configured MySQL server, saturated drives, bad ISP, too big of medias…

It can be anything, really. It’s like asking “why does my car doesn’t work as expected” and expecting a mechanic telling you the fix without even knowing the color of your car.

---

<div class="post-metadata">

**Author:** ![msmerry](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/msmerry/32/13380_2.png) [@msmerry](https://forum.mautic.org/u/msmerry)\
**Post date:** [April 14, 2025, 3:52am UTC](https://forum.mautic.org/t/tracking-code-mtc-js-very-slow/14292/4 "2025-04-14T03:52:59Z")

</div>

FWIW, in case anyone sees this, I switched off dreamhost and over to am amazon lightsail instance. Less expensive and no performance issues.
