Category "gtag.js"

Google Analytics 4: how to get the name of global object (gtag)

In Google Analytics Classic/Universal Analytics we could get the name of global object using such code: window['GoogleAnalyticsObject'] And then we could get t

GA4: Price is appended with multiple zeros

While using GA4 view_cart, begin_checkout, add_payment_info events for Item array Price parameter is appending multiple zeros in GA debug view. For example: we

Unload/remove/disable Google Analytics dynamically without a full page load

I see various guides on how to add Google Analytics/ GA into a page dynamically, e.g. for a Single Page Application/ SPA. How can I do the reverse, i.e. a user

gtag function Typescript definition

I use original Javascript function function gtag(){dataLayer.push(arguments);} then got error: error TS2554: Expected 0 arguments, but got 3. when used like

Offline tracking with gtag.js

With ga.js I could track offline activity and send to my custom server or store in localhist by overriding the sendHitTask. Like this: https://www.google.se/amp

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.