You are here: Tags / cookie
You can utilize Server-side tagging in Google Tag Manager to build your own custom Universal Analytics proxy. This proxy comes in the shape of a new Client custom template, which takes the incoming /collect requests and sends them to Google Analytics. While doing so, it also returns the _ga cookie in a Set-Cookie header, thus preventing Safari’s Intelligent Tracking Prevention from capping its expiration to just 7 days. You might also be interested in reading what Google’s own solution is for migrating from JavaScript cookies to those set in HTTP headers.

Continue reading

Updated 15 April 2020: Fix the message forwarder to properly clone objects before they are passed to postMessage Here I am, back with <iframe> and cross-domain tracking. I’ve published a couple of articles before on the topic, with my upgraded solution being the most recent one. These articles tackle the general problem of passing the Client ID from the parent to the <iframe>. By doing so, the <iframe> can take the Client ID from the frame URL and create the _ga cookie in the <iframe>, allowing hits from the parent and the <iframe> to use the same Client ID.

Continue reading

There is a new version of this post for GTM V2 here. While going over my previous post about using weather conditions to segment data in Google Analytics, I started thinking about performance issues. Since I’m using a visit-scope custom dimension, it seems futile to have it send the weather details with every single page load. The odds of the weather changing drastically during one visit are slim (unless you live in the UK), and I have yet to come up with a good reason to change my on-site behavior because the weather changed from a drizzle to a downpour.

Continue reading

Author's picture

Simo Ahava

Husband | Father | Analytics developer
simo (at) simoahava.com

Senior Data Advocate at Reaktor

Finland