code: def report_errors_to_ga(self, errors):
          
          hits = []
          responses = []
          for field_name in sorted(errors):
              for error_message in errors[field_name]:
                  event = self.format_ga_hit(field_name, error_message)
                  if event:
                      hits.append(event)
  
          if self.ga_batch_hits:
              for hit_batch in _batch_hits(hits):
                  response = requests.post(self.get_ga_batch_endpoint(), data=hit_batch)
                  responses.append(response)
          else:
              for hit in hits:
                  response = requests.post(self.get_ga_single_endpoint(), data=hit)
                  responses.append(response)
          return responses
docs: Report errors to Google Analytics
          https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide