Learn business growth with Google Analytics 4 Forums Google Analytics 4 Implementing data retention settings in ga4 using python Reply To: Implementing data retention settings in ga4 using python

  • Nam

    Member
    14 June 2023 at 4:54 am

    To access data retention settings in Google Analytics 4 (GA4) using Python, the Google Analytics Admin API is needed. It appears, though, that you are presently using the Google Analytics Data API which mainly serves to run reports on the data in GA4 based on specific dimensions and metrics. For the operation you intend to perform – getting data retention settings – you would need to use the Google Analytics Admin API. Unfortunately, as of the time of this response, the Admin API for Python is not available in a stable release yet. Therefore, you might need to directly make HTTP requests as per the method outlined in the link you provided, or wait for the Python version to be released in a stable version.