Skip to content

Commit

Permalink
Lightens up GAN logging level & sets DryRun while in Debug mode
Browse files Browse the repository at this point in the history
- DryRun allows all screens & events to be logged like normal, but doesn't actually send anything to the tracker.
  • Loading branch information
dsibiski authored and jsierles committed Jun 5, 2015
1 parent 73ff2bc commit 0f48615
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions iOS/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ @implementation AppDelegate

static NSString *const kGANPropertyId = @"UA-63760955-1";
static NSTimeInterval const kGANDispatchInterval = 120.0;
#if DEBUG
static GAILogLevel const kGANLogLevel = kGAILogLevelVerbose;
#else
static GAILogLevel const kGANLogLevel = kGAILogLevelWarning;
#endif

- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
NSUInteger orientations;
Expand Down Expand Up @@ -139,6 +135,10 @@ - (void)initializeGoogleAnalytics {
[GAI sharedInstance].dispatchInterval = kGANDispatchInterval;
[GAI sharedInstance].logger.logLevel = kGANLogLevel;
[[GAI sharedInstance] trackerWithTrackingId:kGANPropertyId];
#if DEBUG
[[GAI sharedInstance] setDryRun:YES];
[GAI sharedInstance].logger.logLevel = kGAILogLevelInfo;
#endif
}

- (void)trackMainScreeView {
Expand Down

0 comments on commit 0f48615

Please sign in to comment.