Lines Matching refs:nv

365 			registerVisit: function(nv, type) {  argument
373 const bot = BotMon.live.data.bots.match(nv.agent);
376 if (!nv._bot) nv._bot = bot ?? null; // bot info
377nv._type = ( bot ? BM_USERTYPE.KNOWN_BOT : ( nv.usr && nv.usr !== '' ? BM_USERTYPE.KNOWN_USER : BM…
379 if (!nv.geo || nv.geo == '' || nv.geo == 'ZZ') nv.geo = bot.geo;
380 } else if (!nv.geo ||nv.geo == '') {
381 nv.geo = 'ZZ';
385 if (!nv._firstSeen) nv._firstSeen = nv.ts; // first-seen
386 nv._lastSeen = nv.ts; // last-seen
389 if (nv._type == BM_USERTYPE.UNKNOWN) { // only for unknown visitors
390 const ipInfo = BotMon.live.data.ipRanges.match(nv.ip);
391 if (ipInfo) nv._ipRange = ipInfo;
396 nv._country = ( nv.geo == 'local' ? "localhost" : "Unknown" );
397 if (nv.geo && nv.geo !== '' && nv.geo !== 'ZZ' && nv.geo !== 'local') {
399 nv._country = countryName.of(nv.geo.substring(0,2)) ?? nv.geo;
403 nv._country = 'Error';
407 let visitor = model.findVisitor(nv, type);
409 visitor = {...nv, ...{
416 _client: BotMon.live.data.clients.match(nv.agent) ?? null, // client info
417 _platform: BotMon.live.data.platforms.match(nv.agent), // platform info
426 if (visitor._firstSeen > nv.ts) {
427 visitor._firstSeen = nv.ts;
429 if (visitor._lastSeen < nv.ts) {
430 visitor._lastSeen = nv.ts;
435 visitor._viewCount += (nv.captcha == 'Y' ? 0 : 1);
439 if (nv.captcha) visitor._captcha[nv.captcha] += 1;
442 let prereg = model._getPageView(visitor, nv);
445 prereg = model._makePageView(nv, type);
449 prereg._viewCount += (nv.captcha == 'Y' ? 0 : 1);
452 prereg._lastSeen = nv.ts;
463 if (visitor._lastSeen < nv.ts) {
464 visitor._lastSeen = nv.ts;