44ubpq
Last Updated: February 25, 2016
·
700
· otupman
45975fcc42c585f7ddd9711e1f5198a7

Anonymise Google Analytics on iOS

I spent a fair old while looking for this - the Google Analytics documentation describes the GA anonymisation of IPs for the JavaScript tracker, but I found very few hits for the iOS SDK.

In fact, once I found the particular setting, I found something like 7. If you're not digging through the settings you'll miss it.

id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
if(tracker) {
    // Anonymise the user's IP address (as per GA documentation).
    [tracker set:kGAIAnonymizeIp value:[@YES stringValue]];
}
Say Thanks
Respond