Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Testing Google Analytics iOS SDK

Has anyone found a good way to test Google Analytics on iOS? The SDK is really simple but the docs do not discuss how to test or validate.

Does the library behave differently on the simulator or when running a debug build config?

I setup a delegate GANTrackerDelegate with this delegate method:

- (void)trackerDispatchDidComplete:(GANTracker *)tracker
                  eventsDispatched:(NSUInteger)eventsDispatched
              eventsFailedDispatch:(NSUInteger)eventsFailedDispatch;

That method gets called just fine and I see positive values in eventsDispatched and eventsFailedDispatch has always been 0. Beyond that is there a way I can test that those events are being received correctly and correlate with what I think I'm submitting?

I'm thinking I need to setup a dedicated GA Website profile for test. Run a fixed set of UI automation unit tests and then wait 24 hours for that data to be available and validate "by hand". Ick.

like image 598
Nick Avatar asked Feb 12 '11 19:02

Nick


1 Answers

Now it's a lot easier with realtime analytics, you see the visit in realtime, and it's working on the simulator :

https://www.google.com/analytics/web/#realtime

like image 190
Samuel Avatar answered Oct 19 '22 23:10

Samuel