nl_tokens: **************************************************************************** Performs the given request on the KISSmetrics tracker host .
pl_tokens: function request_kissmetrics_client ( pathname , query_params , callback ) { var query_string = [ '_k=' , this . key , '&' ] . join ( '' ) , uri , v ; query_params [ '_t' ] = ( query_params [ '_d' ] ? query_params [ '_t' ] : Date . now ( ) ) ; for ( var k in query_params ) { v = query_params [ k ] ; if ( query_string !== '' ) { query_string += '&' ; } query_string += [ k , v ] . join ( '=' ) ; } uri = encodeURI ( [ 'http' , ':' , '//' , this . host , ':' , this . port , pathname , '?' , query_string ] . join ( '' ) ) ; // should encode the = sign in the user id var regex = <mask> RegExp ( "&_p=" + query_params [ "_p" ] + "&" ) ; var uri = uri . replace ( regex , "&_p=" + query_params [ "_p" ] . replace ( "=" , "%3D" ) + "&" ) ; request ( { uri : uri } , function ( err , res ) { if ( err ) { console . log ( 'xxx KISSmetrics error' ) ; console . log ( '    uri    : ' + uri ) ; console . log ( '    error  : ' + err . message ) ; } else if ( res . statusCode !== 200 ) { err = new Error ( 'KISSmetrics error ---> RECEIVED WRONG STATUS CODE [' + res . statusCode + ']' ) ; } callback ( err , res ) ; } ) ; }