Google Analytics get absolute numbers instead of charts -
i'm using google analytics embed api create craft dashboard widgets show analytics data have show number instead of chart there easy , fast way 1 number?
i'm doing this
var datachart = new gapi.analytics.googlecharts.datachart({ query: { metrics: 'ga:sessions', dimensions: 'ga:date', 'start-date': '30daysago', 'end-date': 'yesterday' }, chart: { container: 'chart-container', type: 'line', options: { width: '100%' } } });
i think doing things incorrectly, invoking function create chart out data retrieved. if try query on google analytics query explorer, it'll return list of sessions per date specified in metrics
fetch sessions per ga:sessions
value , separated date ga:date
in dimensions
key.
you can use google analytics api query , number immediately. , magic number per requirement, need leave out dimensions
query.
note: vary sesions, pageviews, users, etc.
hope helps.
Comments
Post a Comment