Google Analytics import fail

Trying to import a large amount of data from Google Analytics (11 years) after a migration to Matomo Cloud. The importer is configured in Google Cloud and I can begin the import, but I get the following error:

Error message: Error on day (unknown), { “error”: “invalid_grant”, “error_description”: “Bad Request” }
These errors are unexpected and will likely continue every time you run the import on this day.

I’ve attempted making the import range shorter, but still get the same error message. Not sure if it’s rate limited or something else. Unsure what “invalid_grant” refers to. I mean, invalid_grant errors seem to be a common thing but I don’t have the code skills to troubleshoot.

Suggestions?

You ever found the solution to this issue?
How did it go importing 11 years worth of data?

I got the solution when I mailed support. (Their answer is pasted below for posterity - thanks for the reminder!)
The import is still going :slight_smile: … it’s going to take a few weeks/months :man_shrugging: I’m just happy that the option to import is there!

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.
Feel free to let us know if you have any question, we’re always happy to help.

1 Like