<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_ga_hit(self, field_name, error_message):
 """ Format a single hit """

        tracking_id = self.get_ga_tracking_id()
        if not tracking_id:
            warnings.warn('Google Analytics tracking ID is not set')
            return None
        query_dict = self.get_ga_query_dict()
        query_dict['tid'] = tracking_id
        query_dict['cid'] = self.get_ga_client_id()
        query_dict['ec'] = self.get_ga_event_category()
        query_dict['ea'] = field_name
        query_dict['el'] = error_message
        return query_dict.urlencode()