thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.8k stars 2.67k forks source link

Can not get google analytics data in dashboard #4424

Open littlefoxlee opened 5 years ago

littlefoxlee commented 5 years ago

Version information

Description

After get client ID in google and fill in admin client ID textbox, dashboad can't show analytics data.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to 'https://console.developers.google.com/apis/credentials?project=tcdinfo&supportedpurview=project'
  2. Click on 'create credential', choose OAuth client ID, choose web application, fill in form and submit.
  3. Copy 'client ID' in step 2, and go to setting page to fill it into Admin->google client ID.
  4. Go back to dashboard, no data.

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem. QQ截图20190919172045 QQ截图20190919172131

Additional context

It show a yellow button to login at first time, after login google account, it never show again. In to console, error is VM19:1 GET https://content.googleapis.com/analytics/v3/management/accountSummaries 403 {"error":{"errors":[{"domain":"global","reason":"required","message":"Login Required","locationType":"header","location":"Authorization"}],"code":401,"message":"Login Required"}}

emptynick commented 5 years ago

See https://github.com/the-control-group/voyager/issues/2216

littlefoxlee commented 5 years ago

It worked for me, much thanks @emptynick . Just a little additional question: Can I filter by date or by page? Now it works, but seems readonly.