David Vallejo - Web Analyst

Tracking Google Analytics 4 Events using Data Attributes

I must admit it, I like to use data-attributes for user clicks interactions rather than delegating that work on the IT team or relying on the class/id attributes. ( Data Attributes Tracking ) . For Universal Analytics, this was some kind of easy work, since we had some fixed data attributes names (category, action, label, value when talking about events, or pagepath if we wanted to use a virtual pageview ). With the new event based tracking model…


New Release: GTM/GA Debugger 0.4.0

It's been a long time since the last post, even more since the last extension update. To be exact it took me around 1 year to have this new version ready. The main reason for this delay was that I switched how the extension is built at least 5 times. I don't consider myself a developer which implies that many times I end choosing not the best stack I should. Anyway this has been a real opportunity for my to learn a lot of new technologies/frameworks…


Tracking user's IP Autonomous System Number and Organization details to prevent the spam

Around end of 2019, Google Analytics dropped the Network Domain and Service Provider dimensions support from their reports making an official announment in February about it.These 2 dimensions, where widely used to fight the spam in Google Analytics and there have been a lot of posts going around this topic in the last months. Simo Ahava wrote about how to collect the ISP data third party service in you want to check it. On this post we'll learning…


Tracking your visitors effective connection speed details

I know this is just currently a draft but being it available on Chrome, Edge and Opera ( or any chrome based browser ) make this really usefull in my opinion.In those browsers, there’s a API that allows to get the details about the current connection of the current user. We cab query some info like the current "estimated" connection link, the round-trip ( latency ), based on the recently observed requests by the browser.All these details can be queried…


Tracking the anchor text for the incoming links in Google Tag Manager

Introduction It's been a long time since I took care of this blog's "Analytics" ( In the blacksmith's house, a wooden knife). And I noticed that would be cool having the info about the Anchor Text the sites referring to my sites are using to link me. So I'm sharing the solution I built today in order to capture which Anchor Text was on the referring URLs and sending the info back to Google Tag Manager and from there we'll be able send an event to…


APP + WEB: Google Analytics Measurement Protocol version 2

The Google Analytics Measurement Protocol allows users and developers to make HTTP requests directly to Google Analytics endpoint in order to measure how users interact from any enviroment/platform. Since Google announced the new APP+WEB Properties back in summer, we noticed that the &v parameter that used to hold a fixed 1 value turned to be a =2 value in our hit requests. Which implicitily means that at some point a new version of the Measurement…


Tracking the Protocol version in Google Analytics via Google Tag Manager

Despite you being a SEO or not, I'm sure you're aware of how important the WPO ( Web Performance Optimization ) and this of includes of course how fast your site loads. The faster it loads the better for your users ( and better for the conversion rates they say ... ).At this point you may have heard about HTTP/2 (2015) , which the replacement for the oldie HTTP/1.1 ( 1995) , you have even heard about http/3 ( last draft Feb 2020 ), which is ever…


Tracking Android In-App visits in Google Analytics

This is going to be a quick post about how to track in-app visits from Android devices. When an Android App opens a website in a webview ( in-app visit ), the visit usually comes with an special referrer, It does start with "android-app" referrer string, here you can see a log line about how the referrers comes up. 77.XXX.XXX.XXX - - [20/Mar/2020:11:20:10 +0000] "GET /in-app-test HTTP/1.0" 200 1580 "android-app://org.telegram.messenger" "Mozilla/5.0…


#Discussion :: GDPR Compliance - Google Analytics Setup Proposal

NOTE: I want to start this post with a big disclaimer over it I'm not publishing it in order to tell anyone how they should be doing the Google Analytics tracking to comply with the GDPR / CCPA . The goal of this post being able to start an open discussion about the reliability of this exposed method and any final decision should be taken the site owners under their own responsability. One of biggest issues I ( my clients ) are hitting when implementing…


sameSite Automated Fix and status reporting tool

It has been a hard week with all these vendors announcing the Four Hoursemen of the Cookies Apocalypse arrival.There're a lot of changes coming when we talk about cookies ( 1st, 3rd party ), ITP, GDPR, CCPA,etc . I understand it may be a terrible headache for anyone but we need to keep some calm. Last update has came from Google Chrome, which was expected to start blocking the cookies not containing the sameSite attribute on 4th February. Luckily…