Open lyvyu opened 7 years ago
Sorry, my bad, everything is ok!
@lyvyu how did you do this:
ga(function(tracker) {
var clientId = tracker.get('clientId');
});
using this library?
@machulav in config, when you set up your GA account you have to set up object fields with key clientId: {value}
, see example below:
AnalyticsProvider.setAccount({
...
fields: {
clientId: 12345 // here you set your client id
},
...
})
@lyvyu ok, I see, thank you! But how to get clientId
using this library? Do you have such experience?
@machulav well if you want to retrieve you can reefer to window.ga
object, but what exactly you want to achieve ? why do yo need clientId ?
@lyvyu I need to send clientId
to GA in a custom dimension to achieve this goal: https://www.clickinsight.ca/about/blog/using-clientid-to-connect-multiple-visits
It would be preferable to get clientId
using this library instead of using window.ga
object. But in this library I can't find any property or function which return tracker
object.
@machulav ok, I understood...unfortunately you can't do this with this library.
In my case, I was supposed just to change default clientId
with one that came from another site!
Anyway you have to do this with window.ga
instead! Good luck!
@lyvyu thank you!
This seems like a reasonable feature addition to surface the clientId. I am re-opening this issue and updating it to be a feature request.
Hello,
I need to set clientId on analytics init but i don't understand how to get it.
Here is what i found in google docs:
So my question is How can i do this with this angular module ?
Thanks in advance.