Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8041227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:08:35+00:00 2026-06-05T04:08:35+00:00

I am currently developing GA reporting web app for my company using asp.net Google

  • 0

I am currently developing GA reporting web app for my company using asp.net Google api V3(Google.Apis.Analytics.v3.dll). I understand there is older version of .net api and some example for it but when there is newer version I might as well use it. This following code snippet is how you send query to retrieve GA data using Google.GData.Analytics.dll. But it’s older version.

AnalyticsService _service = new AnalyticsService("GoogleAnalytics");
_service.setUserCredentials("YourUsername", "YourPassword");
DataQuery dataQuery = new DataQuery(Conststr_Url);
dataQuery.Ids = "ga:xxxxxx";
dataQuery.Dimensions = "ga:date";
dataQuery.Metrics = "ga:visits";
dataQuery.GAStartDate = "2012-05-10";
dataQuery.GAEndDate = "2012-05-24";
DataFeed visits = _service.Query(dataQuery);
foreach (DataEntry entry in visits.Entries)
{
      Response.Write("Date: " + entry.Title.Text.Replace("ga:date=", "") + " Visits: " +   entry.Metrics[0].Value + "<br />");
}

With version3, I managed to do oauth2 authorisation part successfully using Tasks.ASP.NET.SimpleOAuth2 sample application they provide. But when I try to replace the task service with google analytic service, I just don’t know where to start. All I know is declaring the analytic service, and from that point I have nothing to go on 🙂 .Can anyone help me with abit of code snippets or direct me to an exmaple site.

Thank you very much in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T04:08:37+00:00Added an answer on June 5, 2026 at 4:08 am

    After searching around on stackoverflow and google for a few days, here is what I found out. Unlike previous version, you need to create a “GetRequest” object using AnalyticService and fetch the data using that object to get “GaData” result object back. Here is the code:

    var request = _analyticsService.Data.Ga.Get(ProfileID, StartDate, EndDate, Metrics);
    request.Dimensions = Dimensions;
    request.Segment = Segment;
    request.Sort = Sort;
    request.StartIndex = StartIndex;
    request.MaxResults = MaxResult;
    GaData results = request.Fetch();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently developing a ASP.NET web application. The application is designed for Google Chrome.
Im currently developing an In-House Enterprise application. I will publish the app using Apple
I am currently developing an iPhone app using Apache Cordova (phonegap) and xcode to
I'm currently developing an app running on android api 4 (1.6) and above. However,
I'm currently developing my first game app for android OS using Processing. I need
Currently developing a connector DLL to HP's Quality Center. I'm using their (insert expelative)
I´m currently developing a web site using Symfony2. On 'dev' environment everything works just
Im currently developing av price list using SQL Reporting Services. In that report I
I am developing an iphone app with the capability of recording voice using AVAudioRecorder.Currently
I am currently developing a ASP C# web application. I have created a settings

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.