Created
May 18, 2014 14:57
-
-
Save kirang89/bd1cc9a702a7d3b13e67 to your computer and use it in GitHub Desktop.
Injecting analytics into outgoing links by overriding AppDelegate -openURL::
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(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