Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am using the below code and it's not working with the custom definition and getting "not set" as a value. But in the debug view I am getting the value in the "data layer". #83

Open
priyabratap opened this issue Aug 8, 2024 · 0 comments

Comments

@priyabratap
Copy link

priyabratap commented Aug 8, 2024

I am using the below code and it's not working with the custom definition and getting "not set" as a value. But in the debug view I am getting the value in the "data layer". [image:debug-datalayer]

debug-datalayer
// Set user properties using ReactGA set
  ReactGA.set({
    user_name: userData?.name,
    pst_code: userData?.store?.code,
    pst_name: userData?.store?.name,
  });

I changed the above code and able to see the "data layer" as well as in the "hit details" [image:Hit Details]
Hit Details

ReactGA.gtag('set','user_properties',{
    user_name: userData?.name,
    pst_code: userData?.store?.code,
    pst_name: userData?.store?.name,
  });

ReactGA.set required Object only and can't use set method
Do you know if it is something I need to pass like above? [I mean "user_properties" is important to pass]

Originally posted by @priyabratap in #22 (comment)

@priyabratap priyabratap changed the title I am using the below code and it's not working with the custom definition and getting "not set" as a value. But in the debug view I am getting the value in the "data layer". [image:debug-datalayer] I am using the below code and it's not working with the custom definition and getting "not set" as a value. But in the debug view I am getting the value in the "data layer". Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant