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

  • SEARCH
  • Home
  • 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 8432101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:02:04+00:00 2026-06-10T06:02:04+00:00

I am facing an issue while trying to fetch data from GoogleAnalytics API on

  • 0

I am facing an issue while trying to fetch data from GoogleAnalytics API on piece of code that has been working well just a couple of days ago.

For this I am referencing the following DLL’s:

Google.GData.Analytics.dll
Google.GData.Client.dll
Google.GData.Extensions.dll

And I am using the following code:

Dim visits As String = String.Empty
Dim username As String = "myuser@mydomain.com"
Dim pass As String = "mypassword"

Const dataFeedUrl As String = "https://www.google.com/analytics/feeds/data"
Dim query As AccountQuery = New AccountQuery()
Dim service As AnalyticsService = New AnalyticsService("MyWebAnalyticsService")
service.setUserCredentials(username, pass)
Dim accountFeed As AccountFeed = service.Query(query) ''----------> Exception thrown in this line: GDataRequestException Execution of request failed: https://www.google.com/analytics/feeds/accounts/default

I thought it had to do with a blocking to the account I was using but it wasn’t the case because I verified registering the site for another analytics account and is still not working.

This code has been working flawlessly as I’ve said but all of a sudden has stopped doing so yesterday.

Could you please help me figuring out what’s wrong?. Maybe the way the user credentials are set has changed and I am missing something.

Thank you very much for your help.

‘—-Update—-
I managed to make it work and now I can query the visits for a desired domain. The code goes as follows:

Dim visits As String = String.Empty
Dim username As String = "myuser@mydomain.com" 
Dim pass As String = "mypassword"

‘Follow the instructions on https://developers.google.com/analytics/resources/articles/gdata-migration-guide (Create a Project in the Google APIs Console) to generate your key
‘Once you have it set it as part of the querystring to request our GA service

Dim gkey As String = "key=yourkeystring"

‘Set the new URI to retrieve the feed data and append it the generated key

Dim dataFeedUrl As String = "https://www.google.com/analytics/feeds/data?" & gkey   

‘Create and authenticate on our service instance

Dim service As AnalyticsService = New AnalyticsService("MyAnaliticsService")
service.setUserCredentials(username, pass)  

‘Use the profile id for the account you want to get ths visits from, you can find it
‘logging in your analytics account, select the desired domain on your list (blue link)
click on the administrator button and on the profiles tab find the profile
‘configuration subtab, right there you will find the profile id in this case the eight characters long id 12345678

Dim query1 As DataQuery = New DataQuery(dataFeedUrl)
With query1            
    .Ids = "ga:12345678" 
    .Metrics = "ga:visits"
    .Sort = "ga:visits"
    .GAStartDate = DateTime.Now.AddMonths(-1).AddDays(-2).ToString("yyyy-MM-dd")
    .GAEndDate = DateTime.Now.ToString("yyyy-MM-dd")
    .StartIndex = 1
End With

‘Use the generated datafeed based on the former query to get the visits

Dim dataFeedVisits As DataFeed = service.Query(query1)

For Each entry As DataEntry In dataFeedVisits.Entries
    Dim st As String = entry.Title.Text
    Dim ss As String = entry.Metrics(0).Value
    visits = ss
Next
  • 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-10T06:02:06+00:00Added an answer on June 10, 2026 at 6:02 am

    I have the same problem and it looks like google recently shut down the feed. It is answered in another post. Issue com.google.gdata.util.ResourceNotFoundException: Not Found with Google Analytic

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing the following issue while uploading the video from my android application.
Facing some issue in Talend Admin Console, the jobs that are running from IDE
I am facing an issue regarding EF code first version while mapping one entity
My development team of four people has been facing this issue for some time
I am facing a class resolution issue while trying to make my architecture flexible.
I'm facing the same issue, while trying for cross-domain request. Situation is strange, my
I am facing issue while trying into insert special symbols like pound character (£
I'm working on an application that needs to accept posted data from a form
I am facing an issue while trying to use the spring android framework. I
More precisely, I am facing this issue while trying to install https://github.com/barraponto/thacker-profile (commit 75c693581796eddae5fc39870dfcc2647e00c81b

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.