Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EClickAds: rename bidder from EClickAds to eClick #12145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { getDevice } from '../libraries/fpdUtils/deviceInfo.js';

// ***** ECLICKADS ADAPTER *****
export const BIDDER_CODE = 'eclickads';
// ***** ECLICK ADAPTER *****
export const BIDDER_CODE = 'eclick';
const DEFAULT_CURRENCY = ['USD'];
const DEFAULT_TTL = 1000;
export const ENDPOINT = 'https://g.eclick.vn/rtb_hb_request?fosp_uid=';
Expand Down Expand Up @@ -70,7 +70,7 @@ export const spec = {
netRevenue: bid.netRevenue,
currency: bid.currency || DEFAULT_CURRENCY,
adserverTargeting: {
hb_ad_eclickads: bid.ad,
hb_ad_eclick: bid.ad,
},
},
];
Expand Down
10 changes: 5 additions & 5 deletions modules/eclickadsBidAdapter.md → modules/eclickBidAdapter.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Overview

Module Name: EClickAds Bid Adapter
Module Name: eClick Bid Adapter
Type: Bidder Adapter
Maintainer: [email protected]

# Description

This module connects to EClickAds exchange for bidding NATIVE ADS via prebid.js
This module connects to eClick exchange for bidding NATIVE ADS via prebid.js

# Test Parameters

Expand Down Expand Up @@ -36,7 +36,7 @@ var adUnits = [{
}
},
bids: [{
bidder: 'eclickads',
bidder: 'eclick',
params: {
zid:"7096"
}
Expand All @@ -46,10 +46,10 @@ var adUnits = [{

# Notes:

- EClickAdsBidAdapter need serveral params inside bidder config as following
- eClickBidAdapter need serveral params inside bidder config as following
- user.myvne_id
- site.orig_aid
- site.fosp_aid
- site.id
- site.orig_aid
- EClickAdsBidAdapter will set bid.adserverTargeting.hb_ad_eclickads targeting key while submitting bid to AdServer
- eClickBidAdapter will set bid.adserverTargeting.hb_ad_eclick targeting key while submitting bid to AdServer
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ import {
spec,
ENDPOINT,
BIDDER_CODE,
} from '../../../modules/eclickadsBidAdapter.js';
} from '../../../modules/eclickBidAdapter.js';
import { NATIVE, BANNER, VIDEO } from '../../../src/mediaTypes.js';
import { deepClone } from '../../../src/utils.js';
import { config } from '../../../src/config.js';

describe('eclickadsBidAdapter', () => {
describe('eclickBidAdapter', () => {
const bidItem = {
bidder: BIDDER_CODE,
params: {
zid: '7096',
},
};
const eclickadsBidderConfigData = {
const eclickBidderConfigData = {
orig_aid: 'xqf7zdmg7the65ac.1718271138.des',
fosp_aid: '1013000403',
fosp_uid: '7aab24a4663258a2c1d76a08b20f7e6e',
Expand Down Expand Up @@ -63,7 +63,7 @@ describe('eclickadsBidAdapter', () => {
page: 'https://page.example.com/here.html',
ref: 'https://ref.example.com',
ext: {
data: eclickadsBidderConfigData,
data: eclickBidderConfigData,
},
},
},
Expand Down Expand Up @@ -99,7 +99,7 @@ describe('eclickadsBidAdapter', () => {
expect(request.method).to.be.exist;
expect(request.method).equal('POST');
expect(request.url).to.be.exist;
expect(request.url).equal(ENDPOINT + eclickadsBidderConfigData.fosp_uid);
expect(request.url).equal(ENDPOINT + eclickBidderConfigData.fosp_uid);
});
it('should return valid data format if bid array is valid', () => {
expect(_data).to.be.an('object');
Expand Down Expand Up @@ -147,7 +147,7 @@ describe('eclickadsBidAdapter', () => {
expect(_data.imp).to.have.lengthOf(bidList.length);
});

it('have to contain required params and correct format for sending to EClickAds', () => {
it('have to contain required params and correct format for sending to eClick', () => {
const item = _data.imp[0];
expect(item.zid).to.be.an('string');
});
Expand All @@ -167,7 +167,7 @@ describe('eclickadsBidAdapter', () => {
netRevenue: true,
currency: ['VND'],
cpm: 0.1844,
ad: 'eclickads_ad_p',
ad: 'eclick_ad_p',
},
],
};
Expand Down Expand Up @@ -207,8 +207,8 @@ describe('eclickadsBidAdapter', () => {
expect(offer.ttl).to.be.an('number');
expect(offer.cpm).to.be.an('number').greaterThan(0);
expect(offer.adserverTargeting).to.be.an('object');
expect(offer.adserverTargeting['hb_ad_eclickads']).to.be.an('string').that
.is.not.empty;
expect(offer.adserverTargeting['hb_ad_eclick']).to.be.an('string').that.is
.not.empty;
});
});
});