Questions tagged [google-analytics-4]

Use this tag with questions about implementing Google Analytics 4, successor of Google's Universal Analytics. Use with the [google-analytics] tag. Questions related to Google Analytics 4 user interface should be submitted to webapps.stackexchange.com.

Google Analytics 4 Properties (GA4), formerly App + Web, are an updated version of Google Analytics tracking. While there are some similarities between Google Analytics 4 Properties and the default Universal Analytics properties widely in use today, Google Analytics 4 Properties uses an event-driven data model and steps away from many aspects of Universal Analytics such as its hierarchical event structure and focus on session metrics and session-scoped data.

Google Analytics 4 Properties are built on two existing Google product platforms: Google Cloud Platform (GCP) and Firebase. Google Cloud Platform (GCP) is a huge suite of tools centered around things like data storage and computing, machine learning, and networking, among many other things. Firebase is a mobile development platform.

Though Google Analytics 4 Properties is built on Firebase, Google Analytics 4 Properties and the data it collects live in Google Analytics (GA).

1325 questions
37
votes
10 answers

Google Analytics 4 with React

I've been trying to use react-ga package with google analytics 4 in my app. The measurement id doesn't work with it and there is no tracking code in google analytics 4 I can use. Please, I need help! import ReactGA from 'react-ga'; const trackingId…
36
votes
5 answers

setup Google Analytics 4 in nuxt.js

I'm having issues setting up a new Google Analytics 4 (GA4) account with Nuxt. Everything seems configured ok based on tutorials, however my traffic doesn't show up in GA (dev & production) In nuxt.config.js I have the following buildModules: [ …
gvon79
  • 642
  • 3
  • 9
  • 18
26
votes
2 answers

What should the client_id be when sending events to Google Analytics 4 using the Measurement Protocol?

I am using Google Analytics 4 (GA4) on the client to track a whole bunch of different events. However, there are 2 scenarios that I can't cover client side: A user completing check out on a payment page hosted by a third-party (Stripe in this…
25
votes
1 answer

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 are sending price as below for items gtag('event', "view_cart", { currency:'MXN', …
Mohan
  • 451
  • 5
  • 6
24
votes
2 answers

How to display Full Referrer URL in Google Analytics 4 (GA4)?

In the past, with older Google Analytics accounts and properties I was able to use a Custom Report on a View to show a table of Full Referral URLs. But with Google Analytics 4 (GA4) I can no longer have Views, so I'm at a loss how I can show Full…
15
votes
2 answers

How do I get View ID from Google Analytics 4?

I tried to retrieve all information about my website from GA (Google Analytics). I'm using laravel and this package https://github.com/spatie/laravel-analytics to make my life easier. However, that package requires "View ID" from GA, which I can't…
Raden Kriting
  • 311
  • 1
  • 2
  • 14
14
votes
2 answers

How can I track and send custom events with the new Google Analytics 4 (gtag.js)?

I have an old website that's using the old Google Analytics code from last decade, and I need help using the new GA4. Old Code (2016) To send custom events and pageviews to Google, I would use the global ga() function from their