Learn business growth with Google Analytics 4 Forums Google Analytics 4 Possible new title: Investigating the issue with retrieving data from Google Analytics using PHP client library Reply To: Possible new title: Investigating the issue with retrieving data from Google Analytics using PHP client library

  • Bailey

    Member
    3 December 2022 at 6:54 pm

    Your issue may be caused by either not having any data within the range you specified or a lack of sufficient permissions to access the data. If the Google Analytics account has no data for the particular period selected, the getRows() method will return a null value. Ensure that you’re querying for a date range in which data exists. Alternatively, the issue might be a lack of permissions on the Google Analytics account. Make sure the service account that you’ve created has the necessary permissions to access the view. Refer to Google’s documentation on setting up access to your Google Analytics data to verify this.