In the old days, with only infrequent use of GA for a new, low-traffic Jekyll site, I found it reasonaby straightforward to set up GA with the “UA-” identifier - now I am stuck trying to use the new “G-” tag method. When I use the browser developer mode to look what is inside the home page I see:
In the detail post that I try hard to explain that, even I’m a premium subscribe from both of the analytic service ($142.40 a month included tax), I don’t find the real idea of them both for my Jekyll site since I used it for only work showcase and note writing.
And finally, after six months of using my Jekyll static site. I decided to remove all the scripts that are analytic and collect information on my sites.
I feel pretty OK and have had good moments since I made my decision.
I think both analytic systems that i mentioned in my post are suitable only for our commercial site or company website.
For personal websites, just like my website. It won’t make any sense or help me in any advance I could get. It is worse than you think on a personal website, low down the website, and count visits for only those who enable “javascript” the others who disabled javascript on their browsers will never show up on analytics.
Thanks for the interesting response - you are correct - this is not a “mission critical” facility that I desperately need - it is just useful to know how many hits the site is getting and to a lesser extent, what countries the hits are coming from . .
Just like @jhvanderschee mention above, you can easily use server logs to track all information you need about visitors. Or you can use Cloudflare Pages as well for counting traffic even a bot machine too.
This is how I add analytics on my Jekyll site, but only if I config.yml to enable it unless otherwise or false value, it will forever disappear.
{%- if site.google_analytics.enabled -%}
<!-- Google tag (gtag.js) -->
<script async src="{{ site.google_analytics.url }}{{ site.google_analytics.id }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ site.google_analytics.id }}');
</script>
{%- endif -%}
The people from Google that already contacted me about how to help them change the name of their product or change the phrase word on the analytics page so everyone could understand it easily.
And I already made it; I sent them a lot of information and a guide.
Google will make a massive change in the next few months. And that time, maybe we should talk about adding analytics late. But now it is a worse life ***.
The doNotTrack API was an early attempt at providing better privacy on the web. It failed (replaced by ad-blockers) and is now deprecated, but some browsers still have the setting. The ga-disable code detects the doNotTrack setting, and presumably prevents Google from tracking the visitor. API Info: