Questions tagged [react-ga]

67 questions
2
votes
1 answer

react.js Google analytics not working. no realtime data is shown

react.js Google analytics not working. no realtime data is shown. I'm also using firebase database need some help import ReactGA from 'react-ga'; function App() { useEffect(() => { ReactGA.initialize('G-6R4D4957DM'); // To Report Page…
2
votes
1 answer

Firebase Analytics: How to get and integrate UA-type measurement ID instead of G-type measurement ID for Firebase Analytics?

I am running a React web app on Firebase. Firebase automatically generates G-type measurement ID (G-XXXX). I'd like to get a UA-type measurement ID (UA-XXXX) and somehow integrate it into Firebase project. Reason: I want to use React-GA package…
J.Ko
  • 6,561
  • 3
  • 12
  • 28
2
votes
1 answer

Triggering event with react-ga returns "Command ignored. Unknown target: undefined"

I get this error: Command ignored. Unknown target: undefined ...when trying to trigger an event like this ReactGA.event({ category: 'Navigation', action: 'Clicked main CTA', }) What does that mean? I have initialised it like…
zok
  • 6,065
  • 10
  • 43
  • 65
2
votes
1 answer

Setup react-ga for conversion

I'm trying to configure google analytics for my react application. In my work I use the react-ga plugin. In all instructions they write that in the ReactGS.initialize() method, the arguments must be in the format UA-XXXXXX-XX, but for conversion,…
mara1esh
  • 35
  • 1
  • 5
2
votes
0 answers

google analytics goal with dynamic funnel

I wish to configure google analytics goal where users reaching to a specific result page after going through an extensive wizard asking them bunch of questions. I set up a custom goal of type destination where the url equals to the result page…
2
votes
3 answers

React Google Analytics - How to check if initialized?

I'm trying to implement react-ga but only in production server (I have my local / dev and prod servers). So, I would like to create a text field in backoffice which value is saved in database. Then in the front side, I initialize react-ga only if I…
Alexis
  • 347
  • 5
  • 16
1
vote
0 answers

Using react-ga4 how to send and event to a specific tracker if multiple trackers are used

I have 2 trackers, however some event I want to send only to tracker 1 (G-0000001) ReactGA.initialize([ {trackerId: 'G-0000001'}, {trackerId: 'G-0000002'}, ]) ReactGA.event('timeToLoad', { loadTime: 10 }); How can I send the 'timeToLoad'…
1
vote
0 answers

react-ga Not Adding Google Analytics Tracker to Page

I have a React app using react-ga package to add a Google Analytics tracker code (UA-123456789-1) to all the routes. However, when I search the source code of the React app using the Chrome browser, the tracking code cannot be found. Sure enough,…
Athena Wisdom
  • 6,101
  • 9
  • 36
  • 60
1
vote
1 answer

Troubles with setting Google analytics in React SSR project

a saw a pretty similar question but there was not even one answer to it, so if somebody can help somehow it would be great. I have a project with SSR on React js, without using Next.js. When i trying to set Google analytics just as Docs says and…
1
vote
1 answer

Google Analytics with react and react router

I have been trying to integrate Google analytics in my react app and i used every way mentioned on this thread and all solutions are failing. Below are the methods i tried and the corresponding error i am getting. Hope someone can help import React,…
1
vote
1 answer

react-ga - simplest Google Analytics set-up on React - no response

I'm trying to set up Google Analytics on my React app but I can't get anything working. I've followed the documentation and am running the following code included in my app.js: import ReactGA from 'react-ga' ... useEffect(() => { …
JimmyTheCode
  • 3,783
  • 7
  • 29
  • 71
1
vote
1 answer

Users visits not being sent to my Analytics account

I want to implement Google Analytics on my react application and I have set it up using react-ga module. import ReactGA from "react-ga"; ... ReactGA.initialize('analytics-code-here'); const App = () => { useEffect(() => { ReactGA.set({…
Amir
  • 473
  • 2
  • 11
  • 24
1
vote
0 answers

Using withTracker() for Google Analytics on render() - React

I am having a hard time figuring out how to implement the react-ga withTracker() HOC with my RegisterContainer setup. I need a RegisterContainer to prevent an alert from triggering on registration and I definitely want to be tracking the register…
douglasrcjames
  • 1,133
  • 3
  • 17
  • 37
1
vote
1 answer

react.ga: how to get the data created in the 'set' API

I am trying to integrate Google Analytics into my react app. And currently I'm using the react-ga library. It's a little confusing or unclear to understand the API set. ReactGA.set({ userId: 123 }) There is not too much explanation about its…
Chris Bao
  • 2,418
  • 8
  • 35
  • 62
1
vote
1 answer

how to set custom client id in react-ga

i'm using react-ga in my app,every thing is ok but i want to change Client id of each device.this is how i initialize react-ga. ReactGA.initialize('UA-11xxxxxx-x', { debug: true, titleCase: false, 'cookieDomain': 'auto', gaOptions:…
zulqarnain
  • 1,536
  • 4
  • 26
  • 44