Learn how does Universal Analytics Cross Domain work

Univeral Analytics tracking is based on cookies and on a randomly generated clientId. Yep, that’s it. Each time you visit a site using Google Analytics for the first time a new cookie is set in your browser with a randomly generated hash (clientId), that will be used by Google Analytics servers to identificate you in the subsecuent visits.

Let’s see how the cookie looks:

crossdomain_universal

Any of those values can be modified using the … Lee el resto de la entrada

How does the Universal Analytics snippet work

  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-123123123', 'auto');
  ga('send', 'pageview');

The first thing that may attract your attention is the function parameters, they look like a real word. Let start talking about what an “isogram” is, according to the wikipedia:

An isogram (also known as a “nonpattern word”) is a logological term for a word or phrase without a repeating letter.

i,s,o,g,r,a,m are the variables names being used in the Universal Analytics Tracking Lee el resto de la entrada

Tracking the browser orientation status and changes

Last day we were talking about how to measure if our site was showing a responsive layout to our users, and today we’re going to expand that tracking post with orientation tracking for our sites.

We could use the Media Queries to match the orientation, but as this is not much standard we’re going to use the window.orientation value and the viewPort Width and Height values to guess the current page orientation and pass that … Lee el resto de la entrada

Tracking a responsive site and the media queries changes

Every day more sites choose to use a responsive designs for their new sites, making it somekind difficult to track what version of our page is being showed to the user (as all we may now, browser detection is not perfect at all, most of them are based on the User Agent that can be easily faked).

This post will try to show you the different ways to track if user’s are viewing a responsive … Lee el resto de la entrada

Google using ISPs to cache Google Analytics endpoint

I don’t really know if this is happening users using different ISP’s but starting from today I’ve noticed that all my requests to www.google-analytics.com were being served from a not usual but familiar IP address range, and the response time was just 9ms. Hey just a great improvement from the 42ms of average I’m usually getting from Google Analytics servers.

thyngster@hq:~$ ping www.google-analytics.com
PING www-google-analytics.l.google.com (212.142.160.238) 56(84) bytes of data.
64 bytes from cache.google.com (212.142.160.238): 
Lee el resto de la entrada

Google Analytics added sendBeacon functionality to Universal Analytics JavaScript API

New  day and another not publicly published functionality (not that I was aware of) has been added by Google to Universal Analytics JavaScript API.

Till now, for example if we wanted to track our outgoing links or our PDF downloads using an event or a virtual pageview  to be sure that the info was really sent to Google Analytics we needed to either write some javascript to delay the user redirection to the destination page … Lee el resto de la entrada

Enviando una copia local de los hits de Universal Analytics

En muchas ocasiones por mucho que intentemos debuggear nuestras implementaciones, estas pueden fallar en algunas situaciones pues la cantidad de casuísticas que se pueden generar del lado del cliente pueden ser infinitas.

Con urchin.js y ga.js podríamos decirle a Google Analytics que enviase una copia de los hits de forma local,  lo cual nos podía ayudar a ver todos los hits que se estaban envíando para poder ver si por algún motivo en una transacción … Lee el resto de la entrada

Nueva herramienta para probar tus filtros de Google Analytics

Todos sabemos el peligro de jugar con los filtros de los perfiles ( ahora llamados vistas ) en Google Analytics, la posibilidad de que los hagamos mal y terminemos con datos con el formato que no queremos o con datos excluidos de forma incorrecta suele ser bastante alta. Además si nos equivocamos no hay manera de echar marcha atrás, los datos de las las horas y o incluso días en los que los filtros … Lee el resto de la entrada

Introducción al DataLayer de Google Tag Manager

Aunque parezca mentira hace ya casi año y medio que Google hizo público su herramienta de Tag Management. Durante todo este tiempo las actualizaciones de la herramienta ha sido continua aunque por desgracia no haya ningún changelog que reflejen los contínuos añadidos que va recibiendo la herramienta.

Por lo que voy leyendo por ahí, para la gran mayoría de la gente la herramienta no es más que la manera  de moda de configurar Google … Lee el resto de la entrada