Hi, everyone
!
I have one question!
I am now working with AngularJS and Google Analytics API.
I want to know the method of creating of query to get data from my Google 
Analytics account.
I am now using ngAnalytics directive and I get data by using this code:

$scope.chart = {

reportType: 'ga',
query: {

metrics: 'ga:sessions, ga:pageviewsPerSession',

dimensions:ga:month',

'start-date': '2016-10-01',

'end-date': '2016-12-1'

},
chart : {

container: 'chart-container-1',

type: 'LINE',

options: {

width: '100%'

}

}

}

This is the result of that code : 

<https://lh3.googleusercontent.com/-e8AyjbP_JMw/WEZ3sRPsMbI/AAAAAAAAAAM/Q9w-9gNHtnoVFj8FhntJ2-W63ao-FkhKACLcB/s1600/2016-12-06_0430.png>
It is only for this year.
I hope to get data to compare to previous year, like this:

<https://lh3.googleusercontent.com/-jwpTsjr77Po/WEZ4Y0JfZCI/AAAAAAAAAAQ/ar09zy7qSYYGMEdWFQdZ4yPvmQgnIh52QCLcB/s1600/Selection_003.png>

<https://lh3.googleusercontent.com/-GwfK3-3mnZ0/WEZ4mRnQG1I/AAAAAAAAAAU/DFL8BYrvtWElpLN4ksocRzW7aZh-BweXACLcB/s1600/Selection_004.png>

How can I do that?

How must I create query to get it?

I hope to help of you.


Thanks.


Gull Ocean.



-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to