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

ALL-1159_add-logic-for-interstitial-popup #30

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
18 changes: 16 additions & 2 deletions dist/dfp.es6.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/dfp.es6.js.map

Large diffs are not rendered by default.

18 changes: 16 additions & 2 deletions dist/dfp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/dfp.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dfp.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dfp.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "DFP",
"description": "A DoubleClick for Publishers Implementation",
"version": "2.6.5",
"version": "2.6.6",
"license": "MIT",
"author": {
"name": "Elia Grady",
Expand Down
15 changes: 14 additions & 1 deletion src/objects/adManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ export default class AdManager {
// Targeting check (userType vs. slotTargeting)
this.doesUserTypeMatchBannerTargeting(adSlot) &&
// Impressions Manager check (limits number of impressions per slot)
this.user.impressionManager.reachedQuota(adSlot.id) === false;
this.user.impressionManager.reachedQuota(adSlot.id) === false &&
// if the app promotion interstitial DOES NOT pop - SHOW MAAVARON
this.shouldAppPromotionElementPop() === false;
}

printShouldSendRequestToDfp(id) {
Expand Down Expand Up @@ -372,6 +374,17 @@ export default class AdManager {
return shouldDisplay;
}

/**
* Check if the app promotion interstitial should pop
* when it does, the maavaron should not show up
* @returns {boolean} true if the interstitial element should pop
*/
shouldAppPromotionElementPop() {
return typeof window.appPromotionElement !== 'undefined' &&
typeof window.appPromotionElement.getShouldPop === 'function' ?
window.appPromotionElement.getShouldPop() : false;
}

/**
* Check whether or not an ad slot should appear for the current user type
* @param {String} adSlotOrTarget the adSlot to check or the target as a string
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// generated by genversion
export const version = '2.6.5';
export const version = '2.6.6';