Problem with Search Engine Performance and Google OAuth

Hi,
i’m running Matomo 4.4.1 and the premium plugin Search Engine Keywords Performance (v4.3.3).
It seems that the Plugin lost the connection after serval days. Every week i have to reconnect the Google Search Console because of the following error:
“An error occured while validating the account connection: { “error”: “invalid_grant”, “error_description”: “Token has been expired or revoked.” }”
Bing and Yandex is working properly.

Is there any workaround to fix this?
Thanks for your help.
Best, Oliver

Can you please complete the following process.

  1. Generate a new refresh token (existing one is most likely revoked) as described in this SO post
  2. Go to the security tab of your google account dashboard
  3. Under the Recent security activity section, you should see a security alert for your app.
  4. Click on the context menu next to the notification and click DISMISS
  5. At this point you’ll be presented with a dialog of options where you indicate the level of trust you have for the app. I just went ahead and said I trusted the developer/app, obviously. And that’s it! The refresh token should persist after this.

Hello. I’m also having to reauthorize the google search console every week because of this same error. I went to the security tab of my google account dashboard as described, but there is nothing listed under “recent security activity”. How can I set up matomo so that I don’t have to reauthorize with google every few days? I want to rest assured that left unattended, my google search console data will be continuously imported into matomo. Thank you.

@kush I am sorry to hear about the issue.

This error shows that the token is expired or revoked by Google.

With the status of the being set to “Testing” in Google OAuth Client configuration, Google placed a limitation on token expiry and as per Google it is 7 days and this can be sorted by re-authorizing, it will work only for another 7 days and you may have to follow the same step, it is very inconvenient.

I wish I would have known this before purchasing the plugin as this would have significantly influenced my decision to purchase.

I did see in Matomo’s Google Analytics Import documentation the option to “purchase a temporary account” to get around the manual reauthorization issue. I saw no such mention of this on the Search Engine Keywords Performance plugin marketplace page or documentation.

If I purchase a Google workspace account, will it allow me to get around the need to manually reauthorize the google search engine plugin? I don’t know that its worth it for me to pay google a monthly fee for a service I don’t need just to get around this issue, but I’d like to know what my options are.

Or are there any other ways to get around this issue? I want to be able to leave Matomo unattended for many months at a time without worrying about missing out on data.

1 Like

So does having a Google workspace account get around this issue? And is there any other way to fix this?

@kush Thank you for the feedback. And apologies. We will make this information more clear and visible in our guides. Some of our customers managed to fix this by using a Google workspace account as the limitations varies to these accounts.