The Global Site Tag (gtag.js) provides a framework for streamlined web page tagging – giving you better control while making implementation easier. Using gtag.js lets you benefit from the latest tracking features and integrations as they become available.
Questions tagged [gtag.js]
215 questions
15
votes
1 answer
How can I combine Google's Global Site Tag with Subresource Integrity?
I'm implementing global tracking on my site following the steps described by Google. But I want to also keep my Subresource Integrity (SRI) up to date. So I ran the following command to find the integrity hash for gtag.js.
> curl -s…
![](../../users/profiles/5465007.webp)
Roald Bankras
- 496
- 4
- 13
14
votes
3 answers
Getting client ID with gtag.js
Google released gtag.js a couple of months ago as the new way of tracking with Google Analytics, eventually replacing analytics.js as far as I understood. gtag.js is the default when setting up a new Google Analytics account, so the code snippet…
![](../../users/profiles/784841.webp)
ba0708
- 8,528
- 11
- 61
- 97
13
votes
2 answers
Google Analytics gtag.js ready callback
I try to update my Google Analytics implementation from analytics.js to the new gtag.js.
In the old implementation I am using the ready callback function.
ga(function() {
console.log('Google analytics is ready');
});
How can I implement a…
![](../../users/profiles/2717607.webp)
xela84
- 214
- 2
- 9
10
votes
3 answers
Google Analytics Gtag Multiple Analytics Account Tracking IDs
From what I can see Google seem to be phasing out analytics.js now in favor of their tag manager.
How do I fire google analytics new gtag tracking code for multiple analytics accounts?
Something like this: