0

Im trying to change the Tracker Id of the google analytics in my app. We already have a the google analytics set up in the app, and it was working. Now, we want to change the tracker id of it to track all the data in a new account.

This is not working tho, I also tried create a new id tracker and setting that as the default tracker but it still doesn't work. Any ideas?

I have the following code in didFinishLaunchingWithOptions in AppDelegate:

id<GAITracker> tracker = [[GAI sharedInstance] trackerWithTrackingId:@"<Id>"];

[[GAI sharedInstance] setDefaultTracker:tracker2];

// Optional: automatically track uncaught exceptions with Google Analytics.
[GAI sharedInstance].trackUncaughtExceptions = YES;
// Optional: set Google Analytics dispatch interval to e.g. 20 seconds.
[GAI sharedInstance].dispatchInterval = 20;

This works if I delete the app and reinstall it but it doesn't work otherwise

4

0 回答 0