def get_impression_pixel_url(codename):
 mac = (codename + hashlib.sha1((codename + g.tracking_secret)).hexdigest())
 v_param = ('?v=%s&' % _get_encrypted_user_slug())
 hash_and_id_params = urllib.urlencode({'hash': mac, 'id': codename})
 return ((g.adframetracker_url + v_param) + hash_and_id_params)

def get_impression_pixel_url ( codename ) : mac = ( codename + hashlib . sha1 ( ( codename + g . tracking_secret ) ) . hexdigest ( ) ) v_param = ( '?v=%s&' % _get_encrypted_user_slug ( ) ) hash_and_id_params = urllib . urlencode ( { 'hash' : mac , 'id' : codename } ) return ( ( g . adframetracker_url + v_param ) + hash_and_id_params )
return a url to use for tracking impressions of the given advert .