Reputation: 88197
I am on a platform where the JS SDK does not work. I want to try to use the REST API or otherwise to get Google Analytics clientID
With SDK I could use
ga(function(tracker) {
var clientId = tracker.get('clientId');
});
Is there an equivalent REST API? I think measurement protocol does not provide such functionality?
Upvotes: 0
Views: 346
Reputation: 32760
There is no rest API because there is no service that provides client ids. This is usually generated by the tracking code.
You can just generate your own clientId with whatever language you have available. UUID format is preferred (to avoid collisions), but basically any (sufficiently random) string works.
Upvotes: 1