I am trying to pull the exact same data i am seeing in my dashboard via the core reporting API for Google Analytics. However I just dont seem to understand why the data can be so different even for the same time period and metrics!
From my web UI this is my table structure in the dashboard.
**Display the following columns:**Dimension: Month of YearMetric: Pageviews**Filter this data:**Only show **Page** containing "/blog/"
And this is what i see in my web UI fore period 09/26/2013 to 12/26/2013:
Month of Year Pageviews 201312 151,502201311 136,856 201310 183,555 201309 22,689
In my script, I use the exact same metrics (except for naming convention differences between the web and API metrics):
dimensions = ga:yearMonthstart-date = 2013-09-26start-index = 1metrics = [u'ga:pageviews']filters = ga:pagepath=@/blog/end-date = 2013-12-26
And this is what i see:
Rows:201312 148626201311 160769201310 154770201309 16099
Report Infos:
Contains Sampled Data = FalseKind = analytics#gaDataID = https://www.googleapis.com/analytics/v3/data/ga?ids=ga:xxxxxx&dimensions=ga:yearMonth&metrics=ga:pageviews&sort=-ga:yearMonth&filters=ga:pagepath%3D@/blog/&start-date=2013-09-26&end-date=2013-12-26Self Link = https://www.googleapis.com/analytics/v3/data/ga?ids=ga:xxxxxx&dimensions=ga:yearMonth&metrics=ga:pageviews&sort=-ga:yearMonth&filters=ga:pagepath%3D@/blog/&start-date=2013-09-26&end-date=2013-12-26Pagination Infos:Items per page = 1000Total Results = 4
So as we can see, the data format is correct but the data inside is wrong. Whats worse is that the data trend is different.