GajendraSinghParihar
GajendraSinghParihar

Reputation: 9131

Get Data From Google Analytics API

I need to get the following data from GoogleAnalytics API

  1. New, Returning, Visits, Organic, Paid, Social, Referral, Direct etc
  2. Bounce Rate, Pages per Visit, Time per Visit.

I have never worked on GoogleAnalytics before. Please forgive me its a basic or broad question.

EDIT : I have found a class GAnalyticsAPI which I am using and its working

 string authToken    = GAnalyticsAPI.GetAuthorizationToken("my_email_id", "my_password");
            string metrics = Server.UrlDecode("ga:visits");
            string dimensions   = Server.UrlDecode("ga:country");
            string filters = Server.UrlDecode("-ga:visits");

            XmlDocument xmld = GAnalyticsAPI.GetDataFeed(.........);
           return xmld;

but can anyone explain(provide detail documents )about the query structure metrics ,dimensions,filters etc so i can make query for the data I need. thanks

Upvotes: 2

Views: 1985

Answers (1)

jk.
jk.

Reputation: 14435

Read the documentation. It will tell you what are valid dimension and metric combinations. Dimensions & Metrics Reference

Also, the Google Analytics Query Explorer is tremendously helpful in experimenting with dimensions and metrics to find the combination you need.

Upvotes: 1

Related Questions