-
Notifications
You must be signed in to change notification settings - Fork 0
imuIdSystem: Added parameters when getting ID #13
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
base: master
Are you sure you want to change the base?
Conversation
|
Tread carefully! This PR adds 2 linter errors (possibly disabled through directives):
|
modules/imuIdSystem.js
Outdated
| const refererInfo = getRefererInfo(); | ||
| return baseUrl | ||
| + `page=${encodeURIComponent(refererInfo.page || '')}` | ||
| + `&ref=${encodeURIComponent(refererInfo.ref || '')}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fecker san
refererはoriginのみでいいってお話でしたが、パースしてoriginのみ抜き出すようにとかした方がいいですか?
GithubのSecrets設定しないと動かないみたいですね😇 |
4a7e5be to
fffd6dd
Compare
|
Secrets設定が必要ならforkだしここでは気にしなくても良さそうですね |
|
動作確認はこんなファイル作ってやりました <!DOCTYPE html>
<html lang="en">
<head>
<title>User ID Modules Example</title>
<script>
var FAILSAFE_TIMEOUT = 2000;
var adUnits = [
{
code: 'test-div',
sizes: [
[300, 250],
[728, 90]
],
bids: [{
bidder: 'pubmatic',
params: {
publisherId: '156209', // required, must be a string, not an integer or other js type.
outstreamAU: 'renderer_test_pubmatic', // required if mediaTypes-> video-> context is 'outstream' and optional if renderer is defined in adUnits or in mediaType video. This value can be get by BlueBillyWig Team.
adSlot: 'pubmatic_test2', // optional, must be a string, not an integer or other js type.
pmzoneid: 'zone1, zone11', // optional
lat: '40.712775', // optional
lon: '-74.005973', // optional
yob: '1982', // optional
kadpageurl: 'www.test.com', // optional
gender: 'M', // optional
kadfloor: '0.50', // optional
currency: 'AUD', // optional (Value configured only in the 1st adunit will be passed on. < br/> Values if present in subsequent adunits, will be ignored.)
dctr: 'key1=123|key2=345', // optional (Value configured only in the 1st adunit will be passed on. < br/> Values if present in subsequent adunits, will be ignored.)
bcat: ['IAB1-5', 'IAB1-7'], // Optional: Blocked IAB Categories. (Values from all slots will be combined and only unique values will be passed. An array of strings only. Each category should be a string of a length of more than 3 characters.)
deals: ['deal-id-1', 'deal-id-200'] // optional: PMP Deals, should be array of strings
}
}]
}
];
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
</script>
<script src="../../build/dev/prebid.js" async></script>
<script>
function getHashedEmail() { }
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function () {
googletag.pubads().disableInitialLoad();
});
pbjs.que.push(function () {
pbjs.setConfig({
"debug": true,
"userSync": {
"userIds": [
{
"name": "imuid",
"params": {
"cid": 5126 // Set your Intimate Merger Customer ID here for production
}
},
],
"syncDelay": 5000,
"auctionDelay": 1000
}
});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest
});
});
function sendAdserverRequest() {
if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
googletag.cmd.push(function () {
pbjs.que.push(function () {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
}
setTimeout(function () {
sendAdserverRequest();
}, FAILSAFE_TIMEOUT);
</script>
<script>
(function () {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
gads.src = 'https://securepubads.g.doubleclick.net/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();
</script>
<script>
googletag.cmd.push(function () {
googletag.defineSlot('/112115922/FL_PB_MedRect', [[300, 250], [300, 600], [728, 90]], 'test-div').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>
<body>
<h2>User ID Modules Example</h2>
<h4>Generated EIDs</h4>
<script>
pbjs.que.push(function () {
var idsDiv = document.getElementById('ids-div');
idsDiv.innerHTML = JSON.stringify(pbjs.getUserIdsAsEids(), null, ' ');
});
</script>
<pre id="ids-div" style="border:1px solid #333; padding:5px; overflow: scroll"></pre>
<h4>Ad Slot</h4>
<div id="test-div" style="border:1px solid #333; padding:5px;">
<script>
googletag.cmd.push(function () { googletag.display('test-div'); });
</script>
</div>
</body>
</html> |
|
lgtm |
fecker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
基本的にLGTM(ですが、Beacon作るまでちょっとまってね)
query parameter の build だけちょっと確認をお願いします。
| const baseUrl = url ? `${url}?cid=${cid}&` : `https://${apiDomain}/${cid}/pid?`; | ||
| const refererInfo = getRefererInfo(); | ||
| return baseUrl + | ||
| `page=${encodeURIComponent(refererInfo.page || '')}` + | ||
| `&ref=${encodeURIComponent(refererInfo.ref || '')}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
細かいのですが page が空なときに &&ref とか ?&ref になっちゃってカッコ悪いなぁと思ってしまい・・
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fecker san
細かいのですが page が空なときに &&ref とか ?&ref になっちゃってカッコ悪いなぁと思ってしまい・・
page が空の時には ?page=&ref=xxxx って感じになりますね(記号だけ残る感じにはならないです!)
page= のところも消したい感じですかね?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あー、ボケてますね・・・
できればパラメータごと消したかったのですが、特にこれなら問題ないかなと思ったのでいっちゃいましょう。
fecker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
本体に出すときの理由が悩ましいのですが、
・利用状況をモニタ
・IDを推定するデータソース
みたいな形でお願いします〜
|
@fecker san
プルリクの概要にこんな感じで書こうと思ってます!
|
…ebid 10 (prebid#13194) * collect EIDs for bid request * add ad slot positioning to payload * RPO-2012: Update local storage name-spacing for c_uid (#8) * Updates c_uid namespacing to be more specific for concert * fixes unit tests * remove console.log * RPO-2012: Add check for shared id (#9) * Adds check for sharedId * Updates cookie name * remove trailing comma * [RPO-3152] Enable Support for GPP Consent (#12) * Adds gpp consent integration to concert bid adapter * Update tests to check for gpp consent string param * removes user sync endpoint and tests * updates comment * cleans up consentAllowsPpid function * comment fix * rename variables for clarity * fixes conditional logic for consent allows function (#13) * [RPO-3262] Update getUid function to check for pubcid and sharedid (#14) * Update getUid function to check for pubcid and sharedid * updates adapter version * [RPO-3405] Add browserLanguage to request meta object * ConcertBidAdapter: Add TDID (#20) * Add tdid to meta object * Fix null handling and add tests * Concert Bid Adapter: Add dealId Property to Bid Responses (#22) * adds dealid property to bid responses * updates tests * use first bid for tests * adds dealid at the correct level * [RPO-4220] Removes Access to Deprecated userId Object (#23) * extracts eids * cleanup * updates tests and fixes typo * fix type defs * use single quotes * remove whitespace * bumps adapter version * removes formatting change --------- Co-authored-by: antoin <antoin.campbell@voxmedia.com> Co-authored-by: Antoin <antoinfive@gmail.com> Co-authored-by: Sam Ghitelman <sam.ghitelman@voxmedia.com> Co-authored-by: Sam Ghitelman <SGhitelman@gmail.com>
Type of change
Bugfix
Feature
New bidder adapter
Updated bidder adapter
Code style update (formatting, local variables)
Refactoring (no functional changes, no api changes)
Build related changes
CI related changes
Does this change affect user-facing APIs or examples documented on http://prebid.org?
Other
Description of change
Other information