Errors on Google import using Admin page

I tied importing Google analytics via the Admin page but I’m receiving a long error:

Error on day 2017-05-15, { “error”: { “code”: 401, “message”: "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See", “errors”: [ { “message”: “Invalid Credentials”, “domain”: “global”, “reason”: “authError”, “location”: “Authorization”, “locationType”: “header” } ], “status”: “UNAUTHENTICATED” } }

I have no idea how to debug this. Any help?

2 previous (unresolved) posts about this problem… I suggest continue on the older one:

I’m returning to my post because I could not find help in the others.
First let me point out that your video tutorial is so outdated compared to the current GA dashboard. So I’m using the text tutorial.

I’m at point 21 of the tutorial (Click on Add URI under Authorized redirect URIs where it says that a special URL/query/ should be appended to the domain), but on authorizing the importer I get a “could not verify token” error, so I have a doubt:
my Matomo runs on-premise under but I also use Wordpress and the tutorial suggests to use
yet my plugin has a different name and no /app folder

So, should use
or what?

I need some help from the Matomo staff. Thank you.

@innocraft, I am a little bit lost here… :wink:

I’m lost too, but I think it’s the tutorials that are lacking information. Let’s recap:
I have on-premise but on creating the OAuth I don’t know what should I write in the Authorized redirect URIs field because I cannot determine if I must include my on-premise url or the Wordpress one. The confusion is also created because I don’t have /wp-content/plugins/matomo/app/ but /wp-content/plugins/wp-piwik/

@mariajones no I haven’t and I’m quite disappointed that Matomo devs don’t give a proper tutorial on such an important topic

it’s actually getting worse, I got the following messages:
Matomo cannot find PHP shell_exec, exec, nohup.
I have those disabled/deleted because I followed other suggestions. So it’s really not clear how to setup Google Importer.

Plus, this other error:
The last archive was successfully executed 3 days ago. Check to have configured a crontab to call core:archive and have configured MAILTO. You can try with command: /.../console --matomo-domain=/..../ core:archive
But the tutorial for that says that it’s not needed with Wordpress.

No clue really.

Hi @Criss ,

Indeed the tutorial is little out of date, as Google changed things drastically in this space.

Information about WordPress provided is only applicable for the users who use Matomo for WordPress. It is a plugin which gives you fully functional Matomo and it is available as a WordPress plugin and it is completely different from Matomo On-Premise.

As I read your message it seems like you’re using Matomo On-Premise, in this case you should use

dear @karthik, you must clarify one thing for me as I’m using both Wordpress and On-premise: is the WP plugin unnecessary? Is it only to show statistics in WP backend or is it that On-premise wont work without it?
Plus, the tutorial link you are giving me is broken.

is the WP plugin necessary?