The Advanced Universal Analytics custom Client template is a Client template for Google Tag Manager’s community template gallery.
Resource |
---|
Vendor documentation |
Blog post |
Gallery entry |
GitHub repo |
PERMISSIONS
Description
This Client template is designed to intercept incoming Measurement Protocol to the Server container. The Client parses the requests, builds an event data object with them, and runs the container with the event model.
It works exactly the same way as the built-in Universal Analytics Client, but it has some extra features.
Features
The template has three settings you can enable if you wish.
Proxy requests to /analytics.js
If you enable this setting, then the Server container will also be configured to respond to a request for /analytics.js
. In other words, you can set your web container to load the analytics.js JavaScript library from the Server container rather than Google’s servers.
Set the Google Analytics Client ID cookie in the response
If you enable this setting, the HTTP response back from the Server container to the browser (or whatever the source of the request) will include a Set-Cookie
header with the _ga
cookie. This is better explained in the blog post, but the purpose is to mitigate the impact of Safari’s intelligent tracking prevention, which reduces the lifetime of JavaScript cookies to just 7 days maximum.
Set the Google Optimize cookie (_gaexp) in the response
This option is the same as the previous one, except it sets the _gaexp
cookie in the response with a lifetime of 3 months. This will keep your Google Optimize experiments from having their data quality negatively impacted by tracking protection mechanisms.
Release notes
Date | Changeset |
---|---|
27 July 2020 | Initial release. |