def payloads(tracking_id, client_id, requestable, extra_info=None, extra_headers=None):
 extra_payload = {'v': '1', 'tid': tracking_id, 'cid': client_id, 'aip': '1'}
 if extra_info:
  for payload in extra_info:
   extra_payload.update(payload)
 for request_payload in requestable:
  final_payload = dict(request_payload)
  final_payload.update(extra_payload)
  (yield (final_payload, extra_headers))

def payloads ( tracking_id , client_id , requestable , extra_info = None , extra_headers = None ) : extra_payload = { 'v' : '1' , 'tid' : tracking_id , 'cid' : client_id , 'aip' : '1' } if extra_info : for payload in extra_info : extra_payload . update ( payload ) for request_payload in requestable : final_payload = dict ( request_payload ) final_payload . update ( extra_payload ) ( yield ( final_payload , extra_headers ) )
get data and headers of api requests for google analytics .