Skip to content

Instantly share code, notes, and snippets.

@kirang89
Created May 18, 2014 14:57
Show Gist options
  • Save kirang89/bd1cc9a702a7d3b13e67 to your computer and use it in GitHub Desktop.
Save kirang89/bd1cc9a702a7d3b13e67 to your computer and use it in GitHub Desktop.
Injecting analytics into outgoing links by overriding AppDelegate -openURL::
-(BOOL)openURL:(NSURL *)url{
if ([[url scheme] hasPrefix:@"http"]) {
[[GAI sharedInstance].defaultTracker sendView:[url absoluteString]];
}
return [super openURL:url];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment