code: def is_valid(self):
          
          is_valid = super(GAErrorReportingMixin, self).is_valid()
          if self.is_bound and not is_valid:
              try:
                  self.report_errors_to_ga(self.errors)
              except:  # noqa: E722
                  logger.exception('Failed to report form errors to Google Analytics')
          return is_valid
docs: Error reporting is triggered when a form is checked for validity