Last Updated: February 25, 2016
·
1.849K
· otupman

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]];
}

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

Privacy leaks on the web often come from scripts the product team did not write. Analytics, ads, and chat widgets can collect form fields and identifiers beyond what the privacy policy describes.

Security insights from Cside