Google analytics API list out eventLabels -


im trying learn google analytics + oauth2.

the documentation confusing, figured i'd go ask help.

i want list out event labels ordered visits.

$results = $analytics->data_ga->get($analytics_id, $from, $today, 'ga:visits',         array(         'dimensions' => 'ga:source',         'sort' => '-ga:visits',         'filters' => 'ga:medium==organic',         'max-results' => '100'));  foreach($results $key => $value)   {     echo $results['totalsforallresults']['ga:visits'];     echo "<br />";   } 

i can list out visits far:/ advice appreciated!

here's sample query explorer report should there. replace variables in code above rows in textboxes:

http://ga-dev-tools.appspot.com/explorer/?dimensions=ga%253aeventlabel&metrics=ga%253avisits%252cga%253atotalevents%252cga%253auniqueevents&filters=ga%253amedium%253d%253dorganic&start-date=2014-03-10&end-date=2014-03-24&max-results=50


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -