forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Enable browsiImpression event. #7
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -194,17 +194,6 @@ let fluctAnalyticsAdapter = Object.assign( | |
} | ||
break; | ||
} | ||
// 全てnobid時発火しない | ||
case CONSTANTS.EVENTS.SET_TARGETING: { | ||
let setTargetingEvent = args | ||
/** @type {Array<String>} */ | ||
let divIds = Object.keys(setTargetingEvent) | ||
if (divIds.every(isBrowsiDivId)) { | ||
let auctionId = find(Object.values(cache.auctions), auction => find(auction.adUnits, adUnit => divIds.includes(adUnit.code)))?.auctionId | ||
sendMessage(auctionId) | ||
} | ||
break; | ||
} | ||
case CONSTANTS.EVENTS.BID_WON: { | ||
/** @type {Bid} */ | ||
let bidWonEvent = args | ||
|
@@ -216,9 +205,11 @@ let fluctAnalyticsAdapter = Object.assign( | |
bidWon: true, | ||
timeout: false, | ||
}) | ||
cache.timeouts[auctionId] = setTimeout(() => { | ||
sendMessage(auctionId); | ||
}, pbjs.getConfig().bidderTimeout || 3000); | ||
if (!isBrowsiAuction(auctionId)) { | ||
cache.timeouts[auctionId] = setTimeout(() => { | ||
sendMessage(auctionId); | ||
}, pbjs.getConfig().bidderTimeout || 3000); | ||
} | ||
Comment on lines
+208
to
+212
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 browsi由来のauctionは別のイベントが発火するので、こちらでは無視しておく |
||
break; | ||
} | ||
default: | ||
|
@@ -341,10 +332,10 @@ const sendMessage = (auctionId) => { | |
ajax(url, () => utils.logInfo(`[sendMessage] ${Date.now()} :`, payload), JSON.stringify(payload), { contentType: 'application/json', method: 'POST' }); | ||
}; | ||
|
||
// window.addEventListener('browsiImpression', (data) => { | ||
// const auction = find(Object.values(cache.auctions), auction => auction.adUnitCodes.includes(data.detail.adUnit.code)) | ||
// sendMessage(auction.auctionId) | ||
// }) | ||
window.addEventListener('browsiImpression', (data) => { | ||
const auction = find(Object.values(cache.auctions), auction => auction.adUnitCodes.includes(data.detail.adUnit.code)) | ||
sendMessage(auction.auctionId) | ||
}) | ||
Comment on lines
+335
to
+338
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. browsiが用意した browsiImpression イベントを使用 |
||
|
||
fluctAnalyticsAdapter.originEnableAnalytics = fluctAnalyticsAdapter.enableAnalytics; | ||
fluctAnalyticsAdapter.enableAnalytics = (config) => { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
📝 SET_TARGETINGでメッセージを送るのはやめる