Analytics Import Error

We have followed the instructions to import google analytics data step by step. Nevertheless we receive the following error message.
Could the support team access our installation?

Bildschirmfoto 2021-04-20 um 10.51.30

Getting the same error after 7 days… probably because the token expires.

Clicking “RE-AUTHORIZE” at the top on the Google Analytics Import settings page every 7 days works for us.

1 Like

Hi @thomas.kettner, is this immediately after authorizing, or is it as @euklid describes the token expires after a certain amount of time? If it’s expiring after working for a while, it is likely due to Google revoking permissions for the token, which happens sometimes for apps in the Google developer console marked as test apps. We’ve found one potential solution so far that doesn’t require constantly reauthenticating but we haven’t tested it yet: https://stackoverflow.com/questions/66058279/token-has-been-expired-or-revoked-google-oauth2-refresh-token-gets-expired-i

After running the import for a few weeks now with manually “re-authorizing” once a week I now also received this error message:

Error message: Error on day 2018-04-26, { “error”: { “code”: 401, “message”: "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", “errors”: [ { “message”: “Invalid Credentials”, “domain”: “global”, “reason”: “authError”, “location”: “Authorization”, “locationType”: “header” } ], “status”: “UNAUTHENTICATED” } }

Going to the Google Security Check-up in my Google account also revealed the app’s activity got flagged under “Recent security activity” (as described on Stack Overflow) and I had to Dismiss it to get the import working again.

Hi,

Same issue. Just after following this tutorial => https://matomo.org/docs/google-analytics-importer/

errored
Message d’erreur: Error on day 2015-12-17, { “error”: { “code”: 401, “message”: "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", “errors”: [ { “message”: “Invalid Credentials”, “domain”: “global”, “reason”: “authError”, “location”: “Authorization”, “locationType”: “header” } ], “status”: “UNAUTHENTICATED” } }
Ces erreurs sont inattendues et continueront probablement chaque fois que vous exécuterez l’importation ce jour-là. Pour résoudre ce problème, veuillez ask sur les forums. Si vous pouvez fournir l’accès à votre compte GA à un membre de l’équipe d’assistance de Matomo, cela fournira une résolution plus rapide.

Difficult to understand “invalid authentication credentials” because a first piece of data was imported, but the process was interrupted by this message.

Maybe it’s because the limit of Google per day has been reached?

Nevertheless the error message is confusing.

Matomo log indicate:

DEBUG [2022-03-04 10:39:00] 38718 Google Analytics returned an error: {
“error”: {
“code”: 429,
“message”: “Quota Error: profileId 914xxxx3 has exceeded the daily request limit.”,
“errors”: [
{
“message”: “Quota Error: profileId 914xxxx3 has exceeded the daily request limit.”,
“domain”: “global”,
“reason”: “rateLimitExceeded”
}
],
“status”: “RESOURCE_EXHAUSTED”
}
}

INFO [2022-03-04 10:39:00] 38718 Daily rate limit reached, try again tomorrow. (Note: GA by default sets a daily limit on the number of API requests made each day to 50000. It looks like you’ve reached this limit. Continue the import tomorrow.)
Error encountered, aborting.

Google API indicate:

Request for today 10022

Have anybody found a solution to this problem? Unfortunately I haven’t :blush:.

Just for reference, 2 recent posts about this issue (no solution found):

@innocraft @SteveG any idea?
Also if someone can create an issue in the GitHub Repo (I did not found anything about this subject):

1 Like

Hi @nternstedt @100son_net ,

Do you see any error under “Admin (cog icon) > System > Search performance”?

Hi @karthik,

I don’t have that option under system. I think you only have the option if you have the plugin search engine keywords performance.

Hi again @karthik, @innocraft

Do you guys have any solutions to this problem? Every day the same problem occur and after I re-authorizing Google Analytics importer plugin it works fine until next day when it breaks again.

Hi @nternstedt ,

Could you please get in touch with our support team at support@matomo.org. We may need more information to troubleshoot, forum may not be efficient for this.

@karthik any news on this?
@Criss, is also waiting for answers on this topic on:

Have anybody found a solution to this problem? Unfortunately I haven’t, This website pjl draft also facing that