user2702179
user2702179

Reputation: 197

Google Analytics not showing iphone device

I have a Google analytics account with android already set,i need to integrate it with iPhone. I have done the coding part. I am using the same tracking ID which I used in android. Currently only android device and android os is displayed in google account. How should I add iOS and iDevices in Google analytics account? Code is working fine, I have seen the changes in "Events" Whether I need to do anything else... Added SDK, libraries Code follows

    //Google Analytics:
- (void)startGoogleAnalyticsTracking {
    @try {
        [GAI sharedInstance].debug = NO;

        [GAI sharedInstance].dispatchInterval = 120;
        [GAI sharedInstance].trackUncaughtExceptions = YES;
        self.googleAnalyticsTracker = [[GAI sharedInstance] trackerWithTrackingId:@"******"];
    }@catch (NSException *exception) {
        NSLog(@"exception:%@",exception);
    }
}

- (void)sendGoogleAnalyticsStartup {
    @try {
        [self.googleAnalyticsTracker sendEventWithCategory:@"iphone" withAction:nil withLabel:@"Tracking Starts" withValue:nil];
    }@catch (NSException *exception) {
        NSLog(@"exception=%@",exception);
    }
}

- (void)stopGoogleAnalyticsTracking {
    @try {
        [self.googleAnalyticsTracker sendEventWithCategory:@"iphone" withAction:nil withLabel:@"Tracking Suspended /Stopped" withValue:nil];
    }@catch (NSException *exception) {
        NSLog(@"exception=%@",exception);
    }
}

Upvotes: 1

Views: 1597

Answers (1)

Joey
Joey

Reputation: 2978

I am also working with Google Analytics in these days. And I noticed that it takes approximately 24 hours to see the result. However you can also test it in Real-Time menu whether or not the app sends the data.

enter image description here

Upvotes: 1

Related Questions