Untraceable Web Visits Query

I hope I’m in the correct forum for this question.

One of my websites receives approximately 50 ‘visits’ per day. When I disovered this I wanted to know more so I installed tracking code beginning with Clicky. To my shock, all that this software did was track my own visits - even though that was supposededly not supposed to happen.

Background
I have added PHP text-generating script to certain test webpages and this is how I discovered the ‘visits’ to this website. (The PHP script was added to learn how to send texts for an Arduiono project I am currently working on.) That said, these texts let me know when these webpages are ‘visited’ and the ‘visit’ number never matches what the tracking reveals. These texts go on 24/7. Between 23:25 and 19:53 today, I have have received 54 ‘visits’. My time is GMT -07:00.

When Clicky revealed no traffic and moved on to Google Analytics and then on to Matomo, all with the same results. Matomo script is currently still on these webpages. Someone in the Matomo forum is trying to help me which is why I am still using this tracking code.

Question: How can I figure out what is causing these ‘visits’?

I would refer to these visits as pings, but that may not be correct. I’m beginning to think that something nefarious is at play here. I hope someone in this forum has some idea what is causing this.

Thank you.

First of all, are you sure these analytics codes are being put into pages that visitors see? Sometimes if you put the code in where it only shows when you are logged in as an admin or the user is some user level that is not the normal anonymous visitor, then the code can be working but just won’t be put into the page and thus won’t track the user.

Can you tell us the website?

Any time I have seen what you described, where it tracks you but no one else, that is usually the case… the code is put in on pages for where it only is presented to the user if the user is logged in or an admin. Your PHP script on the other hand may then be setup to run as every user.

If you open an incognito/private browser window and visit your site, does it see you on the analytics?

Thank you SO MUCH for your post.

First of all, I need to add some info that I forgot to add to my OP that may prove helpful to you.

A. When I began testing my PHP text generating code I noticed that my most of my webpages were very slow loading. This lead me to using GTmetrix which will help identify why webpages are slow to load. I do not recall these pages loading so slowly, but the resultant GTmetrix page load time of 10 seconds is terrible, to say the least.

B. The GTmetrix visits were tracked by Matomo which I think indicates that the (1) the Matomo tracking code does see actual visits and (2) I think is proof that the tracking code is in the correct location in the html. Matomo recommends the script be placed just prior to the closing head tag.

Private Browsing Results
I opened a Private Browser in Safari and I got the usual text message and Matomo tracked my visit.

Here are the webpages that I have the PHP text script embedded in:

wwbydesign, veneering and fly fishing

Hopefully, if you or someone else clicks on any of these links I will see them tracked by the Matomo code, as a reference, I believe. I’m in a bit of a rush (doctor’s appt), but hopefully I have provided more insight to this pinging issue.

I sincerely appreciate your help.

And, yes, I know fly fishing has nothing to do with wood working.

Oh, well, …

Ok well I just tried a page on your site that matomo is not on and one that has it and timed them both through dev tools, looking at loading and noticed that matomo is really slowing down your pages. You might want to try another solution.

Just load your about-this-website.html page which doesn’t have the script on it. Pretty fast load. Load another page and you will see through dev tools that matomo is over half your page time. So something in that script is really slowing things down. I have never heard of that script for analytics either but any analytics script should be optimized for sub 200-300 milliseconds with ones like Google Analytics being far less than that.

Thanks for the feedback.

Ok, I just reinstalled the GA script, but only in the index.php webpage.

I have never checked the loading with GA installed.

I sincerely appreciate your help.

Just loaded the index page and it it faster with the GA script.

Just ran the index page through GTmetrix - the results were much worse as seen next:


It took 14.6 seconds to load the index.php webpage. That’s terrible!

While all of this is very enlightening , I do not think it helps resolve my primary issue: What is causing all of these untraceable webpage visits or pings. Today beginning at 0650H until 1856H, I have received 60 texts/webpage hits. To be fair, some of these visits have be tracked by the Matomo tracking script, but that number is 4-5, not many.

Thanks!

I don;t know what your back-end processing is doing but if the content is saved to a html file then the speed difference is appreciable!!!

Also try converting the enormous jpg images to the new webp format and there is also another remarkable rendering difference?

Online Demo

Edit:

I forgot to mention adding adding “loading=’'lazy” to img src files also makes a big difference,

You’ve got something going seriously wrong here. I just tried your index page and its taking an age to load. There is nothing I can see in the code that should be slowing it down to this extent. I have a small microsite which loads about 10 images plus JS, cookiebot and GA and it returns in <500ms. Your site on pingdom returns in about 14secs!

Can I suggest you make the simplest html page you can eg just

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Test</title>
</head>

<body>

	<h1>This is a test</h1>

</body>
</html>

And test the speed of that. Perhaps your hosting server is doing something it shouldn’t be if that doesn’t return in ms’s

Looks like the worst culprit is the large jpeg at 439ms, then jquery.min.js at 387ms, then main.js at 331ms. The CSS is109ms, 9.80ms for the basic structure and 95ms for the favicon

Thank you very much for your post. Here are the loading results of your web page using my hosting service:
sitepoint-noopy-test-webpage

Load time using GTmetrix was 0.5 seconds. So this appears to exonerate my hosting service.

I am beginning to think that some malicious code has been embedded in the index.php web page. I have looked for strange scripting, but found nothing. Perhaps it does not exist or is elsewhere. The visits/pings to this web page are driving my up the wall.

I sincerely appreciate your help.

Thank you so much for your very informative comments and suggestions. I will look into everything that you have mentioned. Your ‘Online Demo’ is amazing. I have much to learn.

While I sincerely appreciate all of the tremendous help I have received, my main concern (for beginning this thread) was all of the ‘visits’ that this web page receives that never appear when tracking script is added to the web page.

Do you have any idea what might be the cause of this?

Thank you.

possibly js is being blocked or not loaded. If your tracking is counting visits by actual page loads and the matomo tracking is using JS to log visits, if the js isn’t loaded or is blocked it won’t count it.

Thanks for that info. At the moment, I do not know what Matomo uses to track visits. I will definitely look into that. At the moment I have all tracking code removed, but will re-install the Matomo code.

BTW, as of 0815, GMT -07:00, I have received sixty-one texts due to page ‘visits’. This, somehow, has to get resolved.

I sincerely appreciate your help.

By way of comparison, my “hobby” site gets hit at least once per second, largely with various attacks. In every one of these, the Referrer information is blank, that is I have no way of knowing (besides an IP, which is faked but present) where the hits are coming from. If I was using some sort of customer tracking software, I don’t know that it would be able to do anything other than acknowledge a mystery customer.

For 60 hits a day, one thing you might do is log the entire URL that’s being queried (not where they came from, but what they’re trying to go to). When I did this, most of the attacks had a URL like: www.example.com/?redirect=http://somepornsite

Thank you for that info.

Can you tell me what you use to see the Referrer info or IP of your hits. If I could at least know that it may help me understand if my ‘hits’ are malicious or not.

Thanks.

I use PHP on the server, so:

$ip = $_SERVER['REMOTE_ADDR'];
$referrer = $_SERVER['HTTP_REFERER'];

function CurrentPageURL ()
/*
 *	Return the URL of the web page the user entered
 */
	{
	$isHTTPS = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on");
	$port = (isset($_SERVER["SERVER_PORT"]) && ((!$isHTTPS && $_SERVER["SERVER_PORT"] != "80") || ($isHTTPS && $_SERVER["SERVER_PORT"] != "443")));
	$port = ($port) ? ':'.$_SERVER["SERVER_PORT"] : '';
	$url = ($isHTTPS ? 'https://' : 'http://').$_SERVER["SERVER_NAME"].$port.$_SERVER["REQUEST_URI"];
	return ($url);
	}

Thank you very much for the PHP script. I will add your script to my index.php webpage.

Will report back later today.

I appreciate your help.

I finally have some news to report.!

First of all, I did not use your code snippet. After going over your code I simplified it to fit my needs. I actually sent the ip address, city, state and country as part of my text message.

Okay, back to page load speed: it was the text-sending php script that was slowing the page load times. The most recenty GTmetrix load time was 10.3 seconds. Without the text script, the page load time was 1.5 seconds. Much better!

I coded up a millisecond timer to bench the php script and it revealed an execution time of nearly 9 seconds. This was definitely the speed bump slowing things down.

execution_time

I have no idea why this seemingly simple PHP script takes so long to execute, but it does. All text scripts have now been removed and the pages load as quickly as they used to. I no longer receive texts, but that’s fine. I do wish I knew how to speed up this PHP code because I found it interesting to know where all of my visitors were coming from.

Lastly, the Matomo tracking code never saw the same info that my texts did. These were mostly Asian from what I could tell.

I sincerely appreciate everyone’s help.

2 Likes