This project has moved and is read-only. For the latest updates, please go here.

Tracking to more than one Analytics account

Apr 21, 2014 at 8:36 PM
Hi,

First of all - thanks for all the great work you have put into this SDK.

I'm currently using the EasyTracker and it works fine for sending information to one Analytics department but I need to send the same tracking information to two different departments.

I have tried to create two different EasyTrackerConfig objects and then replace GoogleAnalytics.EasyTracker.Current.Config before calling GoogleAnalytics.EasyTracker.GetTracker().SendView but only the first Analytics department gets the information.

I have also tried to create a Tracker object manually but I can't figure out how to do this correct. I run into strange runtime execeptions aften calling SendView.

Can you help me in the right direction?
Apr 26, 2014 at 8:53 PM
EasyTracker is designed to work with a single account only. However, you can easily log to multiple accounts by using the tracker object directly as you already suspected. Here is some sample code for getting 2 different tracker objects.
var t1 = GoogleAnalytics.AnalyticsEngine.Current.GetTracker("UA-39959863-1");
var t2 = GoogleAnalytics.AnalyticsEngine.Current.GetTracker("UA-39959863-2");
t1.SendView("ItemsPage");
t2.SendView("ItemsPage");
Let me know if there are additional questions, Tim
May 14, 2014 at 6:57 PM
Thanks - I'm up and running