A.A
A.A

Reputation: 4161

The tracking Id should only be of the format UA-NNNNNN-N

The google analytics dashboard show my Tracking Code in G-XXXXXXXXXX format and the react-GA need it to be in UA-NNNNNN-N

How can I get it in UA-NNNNNN-N format, in my google console I searched tracking info but no page exists and it just show me

In web-only properties, this is referred to as Tracking ID in format UA-XXXXXXXX-

Everything is works for me, google analytics can collect data now, my problem is events, when I send the following event nothing happens in dashboard

ReactGA.event({
  category: 'User',
  action: 'Created an Account'
});

Also in dashboard, when I want to Add event there is no category and action just event name

Upvotes: 5

Views: 3831

Answers (2)

zemil
zemil

Reputation: 5108

Universal Analytics properties will stop collecting data starting 1 July 2023. It’s recommended that you create a Google Analytics 4 property instead.

enter image description here

So you can use this node package with GA_MEASUREMENT_ID

Upvotes: 2

Michele Pisani
Michele Pisani

Reputation: 14199

I have to create a Universal Analytics Property (as shown in following image) and use the relative identifier UA-XXXXXXX-X:

enter image description here

Upvotes: 9

Related Questions