I can’t find any specific documentation about the dispatchPeriod variable in the Google Analytics SDK for iOS.
If I set it to 10 does that mean it will send data to the Google Analytics server every 10 seconds? Does it only send data if new page views or events have been recorded or is it going to send data regardless? I don’t want to use this feature if it will eat up too much battery life but my app has very few events to record (basically just launching and exiting). If I set the dispatch time to 10 seconds and only record events when the app opens and when it closes will it be continually dispatching during my apps runtime or will it only dispatch when those events are recorded?
I have just added Google Analytics to my app and here is what I found out:
If you don’t explicitly call
dispatchand have set thedispatchPeriodto let’s say 10 secs, then when you calltrackPageview/Event/Whatever, these requests to Google Analytics are being queued and actually sent in those 10 secs periods. If there are no requests in the queue, your app doesn’t send anything(to be precise I didn’t sniff the network communication, but at least the.GANTrackerDelegatemethods are not called)Confirmed, just sniffed communication with Wireshark and there is no traffic between my iDevices and the world when I don’t track anything.