Site Overlay

Googles First Party mode

Limited use cases apply, and may only apply to “mass users” without an advanced setup.

Credits Mark Angelo Sampan

The recent update by Google that enables site administrators to use First Party Mode (FPM) is not applicable for many users unless using a proxy front end service for both the main website and any other services such as a tagging server.

The main functionality enables a Google Tag to be served through a first-party domain, which matches the domain of the web server itself.

This has 2 distinct advantages.

1. The cookies set by e.g Google Analytics, will not be flagged as a 3rd party cookie, extending its lifetime beyond the 7 day restriction enforced by strict ITP browsers such as Safari and Firefox.

2. The ability to customise the serving path and “hide” tag ID, making the solution more resilient towards ad- and tracking blocking.

The second feature does not prove very useful though as all subsequent calls to e.g. Google Analytics will still be made through default paths, prone to blocking.

Here are the 2 functions described in detail:

First party mode loading of Google Tag

Google describes the solution in their article here. The pre requisite is that your site uses a proxy, load balancing service or similar service able to support the routing suggested by Google in their documentation.

It works by enabling routing rules to specific paths, routing the request from your own server to a service on the Google Cloud dedicated to your tag id.

This means that instead of serving a Google Tag from www.googletagmanager.com/gtag/js?id=G-YOURTAGID you can serve a Google Tag from yoursite.one/mytag instead.

If your prerequisite of a CDN, load balance or similar proxy for the website support forwarded requests to external endpoints, you can set up this by following Google guide lines.

Custom serving path of Google Tag

Follow the guides to be able to configure either gtag.js or gtm.js to be served from your custom path. This is the functionality that will extend the cookie lifespan, and makes the application more robust towards blocking.

Serving Google Tag from custom domain

Until now, one of the most robust solution of serving Google Scripts for Tag Manager and Google Analytics was through your own sGTM setup, often referred to as first party serving (FPS). This solution can’t work in combination with the FMP, as the routing overrides the use of our sGTM endpoint and you loose the abilities of the tagging server.

Final note

First party mode is great- but serves the purpose for common users who haven’t invested in a tagging server (sGTM) setup, yet still requires a CDN, proxy or load balancer running on site.

Secondly it does not give users control of load path for subsequent calls e.g. to /gtag/js or /g/collect prone to blocking, when relying on a GTM Setup.