How to get server response status for messages in google analytics api or filter pages with 404 status?

I have developed a custom Google Analytics plugin for Wordpress for my own use.

I can get pagePathLevel1posts and views in the results table, but it contains many 404.html pages and some other pages that are different pagePathLevel1, but will receive a 404 server response code if they are visited, since these pages are not on my site now (some of them have already been deleted , and some links do not belong to me)

I want to know the page status of all pages / posts for which I can get pageviews and pagePathLevel1. is there any way i can achieve this.

 return $analytics->data_ga->get(
          'ga:' . $profileId,
          $start_date,
          $end_date,
          'ga:pageviews,ga:uniquePageviews',

          array('dimensions' => 'ga:pagePathLevel1', 'filters' => $filter ) );


    }

Another note:

, , , , .

: " " gapi "api, Google api PHP, id. .

, - , 404 , .

, , , .

+4

Source: https://habr.com/ru/post/1622338/


All Articles