I am using google analytics to track the events. I mean when user comes from the landing page by hitting signup button which has utm values as follow app.abc.com/?utm_source=marketing&utm_campaign=ads&utm_medium=click
. I then save those utms to cookies when it comes to web app app.abc.com
through that signup click. I have initialized google analytics using
ReactGA.initialize('UA-000000-01');
when user signups and signup is successful then I have triggered an event as following
if (response.status === 'success') {
setSession(headers)
await refetchUser()
ReactGA.event({
category: 'accountCreated',
action : 'Sign up'
});
history.push('/')
} else {
//
}
But it is not tracked in google analytics. Did i miss anything? Why it has not tracked this goal of accountCreated?
Here is the screenshot
when user logins then i set userid as well.
I saw user coming through click
medium in traffic sources as i have set utm_medium=click
in signup button which redirected to web app page where i have initialized reactga
but just event is not fired as mentioned above.