Analytics
4.5K members online now
4.5K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

API to get analytics data > acquisition > landing page matrics

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

Can Anyone help me to implement api to get data as I can see on  "acquisition > landing page". Same matrix I want to fetch from google analytics api's.

 

I need SEO clicks count.

I have tried it with Page Tracking apis.

 

Thanks,

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Amit D
May 2017

API to get analytics data > acquisition > landing page matrics

A T
Participant ✭ ✭ ✭
# 7
A T
Participant ✭ ✭ ✭

{"reportRequests":[{"viewId":"92320289","dateRanges":[{"startDate":"2017-05-16","endDate":"2017-05-22"}],"segments":[],"metrics":[{"expression":"ga:users"},{"expression":"ga:newVisits"},{"expression":"ga:sessions"},{"expression":"ga:bounceRate"},{"expression":"gaSmiley TongueageviewsPerSession"},{"expression":"ga:avgSessionDuration"},{"expression":"ga:transactionsPerVisit"},{"expression":"ga:transactions"},{"expression":"ga:transactionRevenue"}],"dimensions":[{"name":"ga:nthDay"},{"name":"ga:sourceMedium"}],"orderBys":[{"fieldName":"ga:totalVisitors","sortOrder":"DESCENDING"}],"samplingLevel":"LARGE","pageSize":10}]}

View solution in original post

API to get analytics data > acquisition > landing page matrics

A T
Participant ✭ ✭ ✭
# 2
A T
Participant ✭ ✭ ✭

it should be fairly simple with: https://ga-dev-tools.appspot.com/query-explorer/

Re: API to get analytics data > acquisition > landing page matrics

Rising Star
# 3
Rising Star

Something like this in query explorer:Screen Shot 2017-05-23 at 10.59.55.pngThis will provide you will a list of landing pages ranked by session

You can add further metrics as you wish. Personally, I prefer to use the google sheets google analytics add-on, this will give you greater opportunities to quickly produce graphs and tables, as well as being able to use the google sheets functions. 

 

 

 

John Wedderburn, Advertiser Community, Rising Star
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.

API to get analytics data > acquisition > landing page matrics

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Thank You A T,

 

I am implementing API's for that in my code. Yes, It will help me a lot.

Can You please help me to get

 acquisition >  Source/Medium > All Traffic

API to get analytics data > acquisition > landing page matrics

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Thank You John,

 

I got Good Idea of dimensions with this. 

Can You please help me to get

 acquisition >  Source/Medium > All Traffic

Re: API to get analytics data > acquisition > landing page matrics

Rising Star
# 6
Rising Star

Screen Shot 2017-05-23 at 11.49.19.png

Something like this. I recommend you play around with this to see what works and does not - copying the standard reports, as you are doing is an excellent place to start. Bear in mind that the API will allow you to make queries which are not correct. A common mistake is to query pagepath and sessions, which will not work (except for landing pages). 

 

 

John Wedderburn, Advertiser Community, Rising Star
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Marked as Best Answer.
Solution
Accepted by topic author Amit D
May 2017

API to get analytics data > acquisition > landing page matrics

A T
Participant ✭ ✭ ✭
# 7
A T
Participant ✭ ✭ ✭

{"reportRequests":[{"viewId":"92320289","dateRanges":[{"startDate":"2017-05-16","endDate":"2017-05-22"}],"segments":[],"metrics":[{"expression":"ga:users"},{"expression":"ga:newVisits"},{"expression":"ga:sessions"},{"expression":"ga:bounceRate"},{"expression":"gaSmiley TongueageviewsPerSession"},{"expression":"ga:avgSessionDuration"},{"expression":"ga:transactionsPerVisit"},{"expression":"ga:transactions"},{"expression":"ga:transactionRevenue"}],"dimensions":[{"name":"ga:nthDay"},{"name":"ga:sourceMedium"}],"orderBys":[{"fieldName":"ga:totalVisitors","sortOrder":"DESCENDING"}],"samplingLevel":"LARGE","pageSize":10}]}

API to get analytics data > acquisition > landing page matrics

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

Thanks A T, I have implemented this but Getting data mismatch with same time range. I have getting very much lesser count as compare to Analytics Panel. I am looking into it.

 

Thank You very Much A.T and John. Smiley Happy

 

API to get analytics data > acquisition > landing page matrics

A T
Participant ✭ ✭ ✭
# 9
A T
Participant ✭ ✭ ✭

happy to help. start with minimum dimensions and metrics then see the count.

API to get analytics data > acquisition > landing page matrics

Visitor ✭ ✭ ✭
# 10
Visitor ✭ ✭ ✭

Yes, It is working fine now thanks.