Reputation: 1088
Hello Guys o/ So i need to set a tracker names in Google analytics, before in old ga.js i have:
_gaq.push(['TrackerFoo._setAccount', 'UA-xxxxxxxx-1']);
_gaq.push(['TrackerFoo._setDomainName', 'sub.domain.com']);
In new analytics.js i have a send and create method:
ga('create', 'UA-xxxxxxxx-1', 'domain.com');
ga('send', 'pageview');
how can i set a TrackerFoo for setAccount, setDomain and others in new analytics.js? i googled and searched in google documentations and found nothing, someone know how to deal with it?
Upvotes: 0
Views: 371
Reputation: 2452
Below shows a namespace of "TrackerFoo"
_gaq.push(['TrackerFoo._setAccount', 'UA-xxxxxxxx-1']);
_gaq.push(['TrackerFoo._setDomainName', 'sub.domain.com']);
Which would equate to this in analytics.js:
ga('create', 'UA-xxxxxxxx-1', 'domain.com', {'name': 'TrackerFoo'});
ga('TrackerFoo.send', 'pageview');
Upvotes: 4