I replace my current default "universal google analytics" code to custom JavaScript to get the clientId but I got string value while using (Like: clientId).
GA code:
ga('create', 'UA-xxxxxx-x', 'auto'); ga(function(tracker){ var clientId = tracker.get('clientId'); }); ga('set', 'dimension1', clientId); ga('send', 'pageview');
This would hardly work since you're assigning cilentID value to the function scoped variable that can not be seen outside the readyCallback function. Consider the following code: