In Google Analytics report, Visits are coming but no data for PageViews are coming
i have incorporated the google analytics in my iphn application. When i am checking my reports, data for Visits are coming but no data for PageViews and Pages/Visit are coming. in my appDelegate file inside the application didFinishLaunchingWithOptions method i have pasted this code as well-
[[GANTracker sharedTracker] startTrackerWithAccountID:@"UA-20206851-1"
dispatchPeriod:10
delegate:nil];
i am using this code for pageView tracking in my viewDidLoad method-
NSError *error;
if (![[GANTracker sharedTracker] trackPageview:@"BuildsViewController.xib" withError:&error])
{
// Handle error here
}
even for event tracking no data is coming. i am using this code for that-
NSError *error;
if (![[GANTracker sharedTracker] trackEvent:@"ButtonClicked"
action:@"production1"
label:@"Environment1"
value:-1
w开发者_如何转开发ithError:&error])
{
// Handle error here
}
here "trackEvent" is method name and i have used any string in "action" and "label". please tell why PageViews are not coming
Only way way to see visits but not pageViews and other metrics or reports is if you aren't waiting long enough for the data to come in. GA takes up to 24 hours to have all the data show up in reports. Don't trust any numbers before at least 24 hours have past.
You need to use a slash: trackPageview:@"/BuildsViewController.xib"
Don't about the dots :)
I've read that google will go crazy for a day when it gets pageview name without a slash.
精彩评论