Posts with Tag
proxy URL

Due to Google’s announcement that they will force us to move away from Universal Analytics to Google Analytics 4 I wasn’t happy with that. Due to a lack of alternatives in minimal analytics, loading official (bloated) tracking code that weights 171kB (in my instance), that is liable for blocking by various AdBlockers, wasn’t something that I had been looking forward.

I started searching for a solution. Due to lack of it, I decided, by hit-and-miss approach, to create my own, and I think I did it. It weighs slightly over 1kB minified. Its main purpose is to track page views (page_view, session_start and first_visit) on our website in Google Analytics 4 property. Since version 1.06 it also detects and tracks site searches (view_search_results) and from 1.07 search query (search_term).

Read More