1

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: {
        name: 'DyuserName',
        userId: 'DyuserId'
    }
});

normally in js we do like this
enter image description here

how can i change client id in react-ga

zulqarnain
  • 1,536
  • 4
  • 26
  • 44

1 Answers1

0

You also need to set the userId to DyuserId like below:

ReactGA.ga("set", "userId", "" + DyuserId);

yaswanth
  • 159
  • 9