Skip to content

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

Closed

Description

@priyabratap

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)

Activity

  1. 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". [/+] on Aug 8, 2024
  2. Repository owner locked and limited conversation to collaborators on Aug 29, 2026
  3. converted this issue into a discussion #97 on Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions