# Lots of Anonymous Contacts appearing

**URL:** <https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [August 12, 2024, 12:55pm UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100 "2024-08-12T12:55:46Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![rushagencia](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rushagencia/32/13084_2.png) [@rushagencia](https://forum.mautic.org/u/rushagencia)\
**Post date:** [August 12, 2024, 12:55pm UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/1 "2024-08-12T12:55:46Z")

</div>

**Your software**  
My Mautic version is: 5.1.0  
My PHP version is: 8.1.29  
My Database type and version is: MySQL 8.0.37

**Your problem**  
My recent and new installation of Mautic shows the existence of many anonymous contacts. These contacts are not registered in the database. Apparently, it is just a “bug” in the graph.

Can anyone tell me if this is normal? Well, look, the list of identified contacts is zero and, in fact, I do not have any registered contacts.

These errors are showing in the log:  
That’s not the case.

Steps I have tried to fix the problem:  
I really don’t know what to do and if this is such a big mistake.

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [August 12, 2024, 9:16pm UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/2 "2024-08-12T21:16:50Z")

</div>

Did you switch to anonymous contacts in the contact list? By default they are filtered out from the view…

---

<div class="post-metadata">

**Author:** ![rushagencia](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rushagencia/32/13084_2.png) [@rushagencia](https://forum.mautic.org/u/rushagencia)\
**Post date:** [August 13, 2024, 12:41am UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/3 "2024-08-13T00:41:06Z")

</div>

Hi, I didn’t change to anonymous contacts, it was like that by default. Anyway, I would like to know what these anonymous contacts are, where they come from and where they are saved?  
Can you explain it to me?

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [August 13, 2024, 8:18am UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/4 "2024-08-13T08:18:02Z")

</div>

Whenever you have mtc.js or a form embedded in a web page, hits will create anonymous contacts. Thats how Mautic works. You can clean up anonymous records regularly via cron jobs.

Even if you didn’t embed them into a page, there may be random hits, as you IP address may have a history.

---

<div class="post-metadata">

**Author:** ![rushagencia](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rushagencia/32/13084_2.png) [@rushagencia](https://forum.mautic.org/u/rushagencia)\
**Post date:** [August 13, 2024, 12:23pm UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/5 "2024-08-13T12:23:59Z")

</div>

The anonymous contact creation is totally normal, so? can you share a exemple of cron job code to exclude they every week, for exemplo? Tks for yout atention and time!

---

<div class="post-metadata">

**Author:** ![AlbertMN](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/albertmn/32/10643_2.png) [@AlbertMN](https://forum.mautic.org/u/AlbertMN)\
**Post date:** [August 13, 2024, 3:00pm UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/6 "2024-08-13T15:00:55Z")

</div>

We get this too. No Mautic scripts active anywhere, but hundreds of contacts created every day. I’m quite certain it’s a bug somehow. Started with v5.

Reported here as well: [V5 huge spike in "Anonymous contacts" & "Page Visits"](https://forum.mautic.org/t/v5-huge-spike-in-anonymous-contacts-page-visits/32401)

---

<div class="post-metadata">

**Author:** ![rushagencia](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rushagencia/32/13084_2.png) [@rushagencia](https://forum.mautic.org/u/rushagencia)\
**Post date:** [August 13, 2024, 6:07pm UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/7 "2024-08-13T18:07:52Z")

</div>

On V4 it does not happend, so? Then, could be a bug… Lets wait if someone by the community aswrer the topic. 😐

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [August 13, 2024, 6:48pm UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/8 "2024-08-13T18:48:30Z")

</div>

Hi @rushagencia , @AlbertMN and everyone else,

I experianced something similar in my case it turned out that mautic was actually firing tracking script on EACH mautic page load. While I did not get to the exact root cause it turned out that I had to reset mautic settings (things saved in config/local.php).

I think in my case migration for local.php from V4 to V5 did not work as expected and so I got this error.

Here are steps I took to resolve that:

- backup current local.php
- replace current local.php content with minimal configuration you get when you first install mautic 5 (something like):

```auto
        <?php
        $parameters = array(
                'api_enabled' => true,
                'api_enable_basic_auth' => true,
                'db_driver' => 'pdo_mysql',
                'db_host' => 'db',
                'db_table_prefix' => null,
                'db_port' => 3306,
                'db_name' => 'db',
                'db_user' => 'db',
                'db_password' => 'db',
                'admin_email' => 'mautic@ddev.local',
                'admin_password' => 'mautic',
                'install_source' => 'DDEV',
                'mailer_from_name' => 'DDEV',
                'mailer_from_email' => 'mautic@ddev.local',
                'mailer_dsn' => 'smtp://localhost:1025',
                'db_backup_tables' => false,
                'db_backup_prefix' => 'bak_',
                'secret_key' => '<secret key>',
                'site_url' => '<https://example.com>',
        );

```

- then login to mautic → Configuration → Save & Close
- go over all mautic settings and adjust it to your needs
- for good masure clear the cache with `rm -rf var/cache/prod/*`

This fixed the issue for me, I hope its useful to someone else.

Best, M.

---

<div class="post-metadata">

**Author:** ![AlbertMN](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/albertmn/32/10643_2.png) [@AlbertMN](https://forum.mautic.org/u/AlbertMN)\
**Post date:** [August 24, 2024, 11:31am UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/9 "2024-08-24T11:31:26Z")

</div>

For us, this wouldn’t fix it, as we don’t even use the tracking script… It just creates random contacts somehow.

---

<div class="post-metadata">

**Author:** ![AlbertMN](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/albertmn/32/10643_2.png) [@AlbertMN](https://forum.mautic.org/u/AlbertMN)\
**Post date:** [August 24, 2024, 11:37am UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/10 "2024-08-24T11:37:29Z")

</div>

After a little bit of digging, I can see that the contacts are usually created from random domains IPs that have nothing to do with ours.

These screenshots below are just a few of the already 133 created contacts from the past 13 hours for us;

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/8/84d06b24ccbbc00a9ad835a9b6dc9c22b5bcc50e.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/b/ba5e862e0d4d5904f5a459635e0bcb21f1ce28d6.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/a/a7c15feeba2113ab5cc08d0b04b6e071979a3153.png)

What all of these have in common, is that the URL leads to a Mautic site with an invalid SSL certificate.

Seems super fishy in my opinion, but how these Mautic sites ping our site or found our domain, I do not know.

We’re looking into whether we can disable this somehow, as we don’t intend to use the Mautic tracking script, and all tracking settings are seemingly disabled;

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/0/0b10e7c79eb9744d4c8bc25496144e6da7885d35.png)

I think this issue really warrants looking in to, as - in the worst case, going full tinfoil-hat here; could there be some issue where Mautic 5 sites are somehow “connected”, seeing the sites that visitors are created from ([https://refreshtab.com/s/login](https://refreshtab.com/s/login), [https://naturebunn.com/s/login](https://naturebunn.com/s/login), [https://tabinex.com/s/login](https://tabinex.com/s/login)) for us, are all Mautic sites, but have got nothing to do with us.

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [August 24, 2024, 2:39pm UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/11 "2024-08-24T14:39:27Z")

</div>

The problem you described does not seem to be related to Mautic tracking, rather its the problem of web server configuration for those domains.

I would create a separate server block where in your web server catch those other domains and deny access to Mautic, that way since request is not even coming to mautic it wont trigger tracking script.

And just to be sure Mautic is not creating contacts when you are using mautic, I would turn on debug mode in config/local.php with ‘debug’ =\> true and check the logs for a bit.

Best, M.

---

<div class="post-metadata">

**Author:** ![AlbertMN](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/albertmn/32/10643_2.png) [@AlbertMN](https://forum.mautic.org/u/AlbertMN)\
**Post date:** [August 25, 2024, 10:35am UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/12 "2024-08-25T10:35:35Z")

</div>

We are working on that now. We enabled Cloudflare “Zero Trust”, but even with this enabled, we get the contacts. It seems our IP is pinged directly. We’re now denying all traffic to our Mautic site that doesn’t go through Cloudflare.

Yet, I’m not quite ready to call this a “solution” - unless we’re the only ones experiencing it like this, but it appears that others experience this.

What I don’t get is why pinging the IP of our Mautic dashboard, creates an anonymous contact? Malicious or not, I can’t see a case where we’d want anonymous contacts created from traffic to our Mautic admin dashboard.

We’ll dig a little deeper.

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [August 25, 2024, 10:45am UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/13 "2024-08-25T10:45:24Z")

</div>

Did you try resetting the config as I suggest above? Even if you are not using tracking script.

And above when I said that tacking script was firing on each page load of mautic I miss spoke perhaps, because tracking script is something that gets fired by web site.

More accurate would be that logic for tracking a contact has been triggered on each page load.

Because of the reason above I still think its a valid thing to try to reset your configuration if you have not done it yet.

---

<div class="post-metadata">

**Author:** ![AlbertMN](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/albertmn/32/10643_2.png) [@AlbertMN](https://forum.mautic.org/u/AlbertMN)\
**Post date:** [August 25, 2024, 10:56am UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/14 "2024-08-25T10:56:57Z")

</div>

Before resetting, we’re trying to find the source in the code; where it’s triggered. We’ll attempt a config reset later, though I must admit I can’t see what the relation might be.

---

<div class="post-metadata">

**Author:** ![AlbertMN](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/albertmn/32/10643_2.png) [@AlbertMN](https://forum.mautic.org/u/AlbertMN)\
**Post date:** [August 25, 2024, 12:36pm UTC](https://forum.mautic.org/t/lots-of-anonymous-contacts-appearing/33100/15 "2024-08-25T12:36:17Z")

</div>

So, in the end, the domains in question seem to be unused domains that pointed to our Mautic server’s IP. So the Mautic instance showed (after ignoring invalid SSL errors), was actually ours. Maybe these sites had our IP, before it was given to us.

The traffic coming from these sites, however, may be a bunch of random crawlers, as it doesn’t seem these domains are in use.

The anonymous contacts were created on 404 page visits, as we missed the “Do not track 404 error (…)” setting in the “Tracking” settings, as this setting - like all others, are defaulted to “No”, but this is the only setting that is sort of “double-negative” _and_ enabled by default, though the setting is set to “No”. I’d definitely recommend this setting be set to “Yes” by default, so 404-traffic is not tracked - unless there’s a point in it being enabled by default, that I do not see?

That means the mystery is solved, on our end at least!

We ended up further disallowing any other hostnames than the one we use, as well as requiring traffic to go through Cloudflare, and thereby “Zero Trust”.

Thanks for your suggestions and time, @mzagmajster. And for OP, @rushagencia; maybe what happened to us, is what happens to you as well. It’s worth checking out, and possibly implementing the fixes we implemented on our end.

Don’t know if any changes from v4 to v5 made this possible, or if it’s just weird timing!
