<commit_before>var CONSTANTS = require('src/constants.json');
var utils = require('src/utils.js');
var bidfactory = require('src/bidfactory.js');
var bidmanager = require('src/bidmanager.js');
var adloader = require('src/adloader.js');
var adaptermanager = require('src/adaptermanager');

function VertozAdapter() {
  const BASE_URI = '//banner.vrtzads.com/vzhbidder/bid?';
  const BIDDER_NAME = 'vertoz';
  const QUERY_PARAM_KEY = 'q';

  function _callBids(params) {
    var bids = params.bids || [];

    for (var i = 0; i < bids.length; i++) {
      var bid = bids[i];
      let slotBidId = utils.getValue(bid, 'bidId');
      let cb = Math.round(new Date().getTime() / 1000);
      let vzEndPoint = BASE_URI;
      let reqParams = bid.params || {};
      let placementId = utils.getValue(reqParams, 'placementId');

      if (utils.isEmptyStr(placementId)) {
        utils.logError('missing params:', BIDDER_NAME, 'Enter valid vzPlacementId');
        return;
      }

      let reqSrc = utils.getTopWindowLocation().href;
      var vzReq = {
        _vzPlacementId: placementId,
        _rqsrc: reqSrc,
        _cb: cb,
        _slotBidId: slotBidId
      };
      let queryParamValue = JSON.stringify(vzReq);
      vzEndPoint = utils.tryAppendQueryString(vzEndPoint, QUERY_PARAM_KEY, queryParamValue);
      adloader.loadScript(vzEndPoint);
    }
  }

  $$PREBID_GLOBAL$$.vzResponse = function (vertozResponse) {
    var bidRespObj = vertozResponse;
    var bidObject;
    var reqBidObj = utils.getBidRequest(bidRespObj.slotBidId);

    if (bidRespObj.cpm) {<commit_msg>Added CPM value as parameter for Vertoz Adapter (#1306)<commit_after>var CONSTANTS = require('src/constants.json');
var utils = require('src/utils.js');
var bidfactory = require('src/bidfactory.js');
var bidmanager = require('src/bidmanager.js');
var adloader = require('src/adloader.js');
var adaptermanager = require('src/adaptermanager');

function VertozAdapter() {
  const BASE_URI = '//banner.vrtzads.com/vzhbidder/bid?';
  const BIDDER_NAME = 'vertoz';
  const QUERY_PARAM_KEY = 'q';

  function _callBids(params) {
    var bids = params.bids || [];

    for (var i = 0; i < bids.length; i++) {
      var bid = bids[i];
      let slotBidId = utils.getValue(bid, 'bidId');
      let cb = Math.round(new Date().getTime() / 1000);
      let vzEndPoint = BASE_URI;
      let reqParams = bid.params || {};
      let placementId = utils.getValue(reqParams, 'placementId');
      let cpm = utils.getValue(reqParams, 'cpmFloor');

      if (utils.isEmptyStr(placementId)) {
        utils.logError('missing params:', BIDDER_NAME, 'Enter valid vzPlacementId');
        return;
      }

      let reqSrc = utils.getTopWindowLocation().href;
      var vzReq = {
        _vzPlacementId: placementId,
        _rqsrc: reqSrc,
        _cb: cb,
        _slotBidId: slotBidId,
        _cpm: cpm
      };

      let queryParamValue = JSON.stringify(vzReq);
      vzEndPoint = utils.tryAppendQueryString(vzEndPoint, QUERY_PARAM_KEY, queryParamValue);
      adloader.loadScript(vzEndPoint);
    }
  }

  $$PREBID_GLOBAL$$.vzResponse = function (vertozResponse) {
    var bidRespObj = vertozResponse;
    var bidObject;
    var reqBidObj = utils.getBidRequest(bidRespObj.slotBidId);

    if (bidRespObj.cpm) {
{'fraction_non_alphanumeric': 0.1311525527361663, 'fraction_numerical': 0.004280036686028737, 'mean_word_length': 3.339522546419098, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6315479', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1116, 'n_words': 226}