Kevin Tracy
From the Desk of
Kevin Tracy

2023-10-21

Temporarily Installing Google Analytics

Not that it matters, since I put Google Ads on my site, you all have been getting spied on by the Big G. However, in the past, I have told you that I was using Awstats to track my web traffic as it tracks visits and hits from the server side, not from a third party coded in to the site that can be easily blocked with privacy and ad block add ons.

404 Errors

In general, I'm pretty happy with Awstats. However, after I changed how we handled 404 errors (sending them to a dedicated 404 page rather than the home page as we had been doing), Awstats stopped reporting what links were generating 404 errors; which makes it difficult to address the problems.

Why does this matter?

So far this month, we've had 1,843 unique visitors and 3,513 total visits to KTracy.com; which actually makes this the best month we've had in years, and we're only two thirds of the way through it! What bothers me is this statistic:

My most popular page on KTracy.com is 404.php and it's been viewed 7,190 times. In other words, that 404 page is viewed at a rate of twice per visit.

Now, I would normally be up in arms about that, but when I'm coding new links, I copy-paste my URLs to prevent typos in links and test the links I've created after they go live. I'm exceptionally confident that the vast majority of these 404 errors are coming from two external sources.

  1. Bots and Peeps trying to break into a CMS
    Being the most important and popular personal websites in the history of the internet, there are a lot of people who want to try and find a vulnerability to hack my website. As a result, they are trying random directories common in various CMS platforms in an attempt and figure out which CMS I'm using. They don't realize I'm hand coding every page of KTracy.com in raw HTML; which is surprising because I don't exactly keep that a secret.

    These 404 errors are actually a badge of honor. I take a great amount of pride in coding my own website in Notepad.

  2. External Links
    This is what I'm really concerned about, and it's been a problem since 2005 when I began using phpBB2 as my first CMS and had to remove a lot of old content. Since then, KTracy.com has gone through several re-designs; most of which would erase all of the old content and result in a fresh start. However, a lot of other websites that linked to my website or blog in the past would then be left with bad links still pointing to KTracy.com.

    So far as I can tell, the only way to fix this problem effectively is to restore what articles I've got in my personal archives (I'm a data hoarder) to the KTracy.com Archives on the News page and update the .htaccess file with a 301 redirect for what the old link was and where the new link with that content is.

However, without Awstats telling me what external links are generating the 404 errors; I need another solution. That other solution is going to be Google Analytics.

I wrote before that I really didn't want to use Google Analytics on this website, as the extra code is expected to have a negative impact on our page load times; which I've been insanely pleased by in recent months. However, this is just a temporary installation allowing me to collect intel on broken links so I can reduce the number of 404 errors being generated for normal visitors (not sweat lords and bots).

Something Is Fishy With Google Ads

After we fixed the 404 errors and .htaccess file on this website and created a robots.txt file; traffic picked up a tremendous amount. At first, Google Adsense was in love with us. We got a bunch of clicks, thousands of impressions, and made a good amount of money in the process. That lasted for about a week before everything died REALLY hard. Since then, I've only made a couple dollars on ads. In fact, according to Google Adsense, as of 2pm today, I've only had 4 visitors on KTracy.com and no ad impressions. Simply put, I know that's not true and I want to know what's going on. I'm hoping Google Analytics might bring some light to the situation since it's another Google product.

The Plan with Google Analytics

I hope to get Google Analytics installed on KTracy.com over this weekend from the KTracy Estate. If we don't start getting answers to these questions soon, the experiment is probably only going to last until the end of November before I remove it from my website.

If it works, and I hope that it will, KTracy.com will probably keep Google Analytics for at least the first half of 2024 (unless the page load times increase too much) and possibly longer, depending on how long it takes bring down the number of 404 errors being generated by external links.