def record_action(action, request, data=None):
 if (data is None):
  data = {}
 data['user-agent'] = request.META.get('HTTP_USER_AGENT')
 data['locale'] = request.LANG
 data['src'] = request.GET.get('src', '')
 record_stat(action, request, **data)

def record_action ( action , request , data = None ) : if ( data is None ) : data = { } data [ 'user-agent' ] = request . META . get ( 'HTTP_USER_AGENT' ) data [ 'locale' ] = request . LANG data [ 'src' ] = request . GET . get ( 'src' , '' ) record_stat ( action , request , ** data )
records the given action by sending it to the metrics servers .