Title: PHP fatal errors
Last modified: July 8, 2017

---

# PHP fatal errors

 *  Resolved [Stephen S](https://wordpress.org/support/users/ssuess/)
 * (@ssuess)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-fatal-errors-4/)
 * PHP Fatal error: Uncaught Google_ServiceException: Error calling GET [https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A154688313&start-date=2017-06-08&end-date=2017-07-07&metrics=ga%3Avisits%2Cga%3Abounces%2Cga%3Aentrances%2Cga%3Apageviews%2Cga%3AtimeOnSite%2Cga%3AnewVisits](https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A154688313&start-date=2017-06-08&end-date=2017-07-07&metrics=ga%3Avisits%2Cga%3Abounces%2Cga%3Aentrances%2Cga%3Apageviews%2Cga%3AtimeOnSite%2Cga%3AnewVisits):(
   400) Unknown metric(s): ga:timeOnSite

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [caribe1999](https://wordpress.org/support/users/caribe1999/)
 * (@caribe1999)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-fatal-errors-4/#post-9302170)
 * Same problem here. Looks as easy to fix.
 * Tracking still works.
 *  [Col_Blimp](https://wordpress.org/support/users/col_blimp/)
 * (@col_blimp)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-fatal-errors-4/#post-9303033)
 * Its affecting the dashboard widget and the shortcode ‘[analytics]’, it’s an intermittent
   issue also.
 *  [escol](https://wordpress.org/support/users/escol/)
 * (@escol)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-fatal-errors-4/#post-9304771)
 * Same problem – the dashboard box sending out errors, but data still being collected.
   Seems related to another error post here that suggests the plugin does not work
   with WP 4.8. Might be time to find an alternative.
 *  [gamelust](https://wordpress.org/support/users/gamelust/)
 * (@gamelust)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-errors-4/#post-9309306)
 * The ga:timeOnSite metric was depricated back in April.
 * Metric – ga:timeOnSite – Use ga:sessionDuration instead.
    [GA Core Change Log](https://developers.google.com/analytics/devguides/reporting/core/v2/changelog)
 * In order to fix the chart on the dashboard you’ll need to edit the plug-in.
 * It’s line 454 in google-analytics-summary-widget.php, just replace ga:timeOnSite
   with ga:sessionDuration and it will work again.
 * should look like this…
    `$stats = $this->api->getMetrics('ga:visits,ga:bounces,
   ga:entrances,ga:pageviews,ga:sessionDuration,ga:newVisits', $this->date_before,
   $this->date_yesterday);`
    -  This reply was modified 8 years, 8 months ago by [gamelust](https://wordpress.org/support/users/gamelust/).
 *  [Gwyneth Llewelyn](https://wordpress.org/support/users/gwynethllewelyn/)
 * (@gwynethllewelyn)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-errors-4/#post-9318704)
 * [@gamelust](https://wordpress.org/support/users/gamelust/), nice catch! It was
   easy to see that there was a call to a deprecated function/component on the Google
   Analytics API, but not which one 🙂
 * Ugh, now I have to manually fix dozens of sites and get Wordfence to ignore the
   changed file until there is a new version of this plugin…
 *  [pembo13](https://wordpress.org/support/users/pembo13/)
 * (@pembo13)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-errors-4/#post-9324176)
 * Confirming fix posted by [@gamelust](https://wordpress.org/support/users/gamelust/)
 *  [akanksha404](https://wordpress.org/support/users/akanksha404/)
 * (@akanksha404)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-errors-4/#post-9326956)
 * I am facing problem with google-analyticator plugin getting error/notice “has_cap
   was called with an argument that is deprecated since version 2.0.0! Usage of 
   user levels by plugins and themes is deprecated. Use roles and capabilities instead.”
   please help to solve this
 *  [graftedin](https://wordpress.org/support/users/graftedin/)
 * (@graftedin)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-errors-4/#post-9330537)
 * When will this be fixed? If its only breaking in the dash I’d rather not fuss
   with manually fixing it.
    -  This reply was modified 8 years, 8 months ago by [graftedin](https://wordpress.org/support/users/graftedin/).
 *  Plugin Author [Garrett Grimm](https://wordpress.org/support/users/grimmdude/)
 * (@grimmdude)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-errors-4/#post-9330936)
 * Hi [@gamelust](https://wordpress.org/support/users/gamelust/),
 * Thanks very much, this fix has been included in the recent 6.5.4 update.
 * -Garrett

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘PHP fatal errors’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/google-analyticator_fefefe.svg)
 * [Analyticator](https://wordpress.org/plugins/google-analyticator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analyticator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analyticator/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analyticator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analyticator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analyticator/reviews/)

 * 9 replies
 * 10 participants
 * Last reply from: [Garrett Grimm](https://wordpress.org/support/users/grimmdude/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-errors-4/#post-9330936)
 * Status: resolved