20TH MARCH 2020 / WEB ANALYTICS

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…

18TH MARCH 2020 / WEB ANALYTICS

#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…

9TH FEBRUARY 2020 / WEB ANALYTICS

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…

21ST NOVEMBER 2019 / WEB ANALYTICS

The Definitive Approach for preventing duplicate transactions on Google Analytics - Using a Universal CustomTask

It's been a long time since I wrote my post about how to prevent duplicate transactions on Google Analytics. At that point, the customTask wasn't a thing on the Google Analytics JS library, and the approach consisted of writing a cookie on each transaction and then work with some blocking triggers. It's a working solution for sure, but based on all the feedback I had over the years, it was not easy to understand for people. Things got worse even…

7TH NOVEMBER 2019 / WEB ANALYTICS

Test API . Unit testing for Google Tag Manager Custom Templates

Google Tag Manager team has just added, in a stealth mode, a new Test API for the Custom Templates. This Test API will allow us to define some Unit Tests in order to be able to automate the testing of our template before publishing them. You will find a new tab within the templates editor named "test" where you will be able to run some code before the tests start, and then add a set of unit test to run each time you want to test your library. For…

5TH NOVEMBER 2019 / WEB ANALYTICS

UDO Debugger - Easiest way to work and QA Tealium implementations

Some years ago, I published my "Tealium Debugger" extension for Chrome which after a nice email my Inbox got, ended being named "UDO Debugger" ( no hard feelings at all ). You may click no the next CTA if you want to install the extension in your browser =) That version published circa Apr 2017, was just showing up the current app state on the page loads, the current account, profile, and environment details. There was no support for anything else.…

29TH OCTOBER 2019 / WEB ANALYTICS

Google Tag Manager Custom Template to grab the current Root domain Name

It happened to me a lot of times that while working with cookies that for whatever the reason I didn't remembered to add the domain name to the settings, or that I was not able to properly define the root domain. If you ever have had the need to set a cookie to the main root domain for your current domain, to make a cookie available for all the place, that depending on your current domain it may not be just enough to split the current hostname, because…

18TH OCTOBER 2019 / WEB ANALYTICS

#proTip - Proactively Cookies Auditing with Google Tag Manager and Google Analytics

Since GDPR was announced and more even with the rise of Safari's ITP and the other upcoming protection feature by the other major browsers, the concers about users privacy was grown which is really nice. But despite browsers taking some actions to prevent the abuses, it's difficult to follow up the current cookies being used in our sites because we may end finding new ones that has been added by the developers, or some new pixel added by someone…

18TH OCTOBER 2019 / WEB ANALYTICS

Setting GA Cookies Server Side with PHP - ITP Workaround

Yeah, I know, this has been done before by others, but since I had this piece of code around, I decided to publish it. It's not going to be usual, method since we'll be relying on sending a duplicate hit to our tracking subdomain. That way we'll be able to have our stuff tracked server-side in a secondary dimension while those hits will take care of setting the cookie expiring time on the main. isn't it cool? What we'll need A subdomain for our domain,…

16TH OCTOBER 2019 / WEB ANALYTICS

#tip - Grabbing current dataLayer variable name within GTM

This is going to be a quick #tip post. and it's coming from a post on Measure Slack. Let's learn how to grab the current dataLayer variable name within GTM. We'll need to create a variable with the following code:function() { return Object.values(window.google_tag_manager).find(function(e) { if (e.dataLayer) return true; }).dataLayer.name;}Now our variable should hold the dataLayer name :)