Analytics API doesn't match web data -


i understand question has been asked elsewhere, haven't yet found answer helpful.

the problem i'm having data on regular web version of analytics doesn't match data i've pulled api.

from i've read, can issue type of query being used. here's i've been using:

  var requiredarguments = {     'dimensions':'ga:medium', 'metrics': 'ga:users, ga:sessions, ga:uniquepageviews, ga:newusers', 'sort': 'ga:medium', 'start-index': '1', 'max-results': '1000', 'sampling-level': 'default', 

};

and then...

  var results = analytics.data.ga.get(     tableid, startdate,  finishdate, 'ga:users, ga:sessions, ga:uniquepageviews, ga:newusers', requiredarguments); 

sessions, across month, instance, can vary other 1000. i've tried using different sampling types; don;t think it's that, because i'm not going on 50,000 sessions in query.

any on appreciated.

you need check result returned if data sampled tell data sampled.

"containssampleddata":false 

samplinglevel

samplinglevel=default optional.
use parameter set sampling level (i.e. number of sessions used calculate result) reporting query. allowed values consistent web interface , include:
default — returns response sample size balances speed , accuracy.
faster — returns fast response smaller sample size.
higher_precision — returns more accurate response using large sample size, may result in response being slower.

if not supplied, default sampling level used. see sampling section details on how calculate percentage of sessions used query.

sampling should return results close not same website. way remove sampling api have premium google analytics account

also remember consider processing latency. if request data under 48 hours old different website.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -