ams-hb's People
ams-hb's Issues
filterAdUnitsBade return wrong results
mergeRecursive is removing default properties
var defaultSettings = {
analytics: {
trackAdblock: true,
trackPrebid: false,
},
autoRefresh: {
interval: 15000, // milliseconds
minVisibility: 0.75, // range 0-1
onlyIfBidWinner: true
},
// prebidAdUnits: ["6544251"],
bidTimeout: 1200
}
var localSettings = {
siteId: '909426',
prebidAdUnitIds: ["6544251"],
autoRefresh: {
interval: 35000, // milliseconds
minVisibility: 0.49, // range 0-1
// onlyIfBidWinner
},
}
Expected result is:
{
analytics: {
trackAdblock: true,
trackPrebid: false,
},
autoRefresh: {
interval: 35000, // milliseconds
minVisibility: 0.49, // range 0-1
onlyIfBidWinner: true
},
// prebidAdUnits: ["6544251"],
bidTimeout: 1200
}
but we observe following result, where autoRefresh.onlyIfBidWinner is missing:
{
analytics: {
trackAdblock: true,
trackPrebid: false,
},
autoRefresh: {
interval: 35000, // milliseconds
minVisibility: 0.49, // range 0-1
},
// prebidAdUnits: ["6544251"],
bidTimeout: 1200
}
new version prebid: add aolBidAdapter, remove pubwiseAnalyticsAdapter
add time tracking on console log for addAdUnit and AdServer enqueue for each slot
the aim of this tracking os to measure difference from calling prebid for prebidAdUnit and prebid ad unit from DOMContentLoaded
Use a global var to enable/disable
on auto-refresh prevent to request AdServer if no winning bid
can we configure this behavior ? enable/disable
add prebid analytics on lib
add Ad Block Tracking With Google Analytics
Calls to adserver are not made when no bidders responded
Allow to add code on hb-config-[SITE-TOKEN] to define ad Units to bid.
update adUnit.code to integer instead of string
Track on Google Analytics javascripts exceptions
Replace setTimeout(function() {addAdUnits(adUnitsIdAvailableOnPage)},5000); by sync call after receiving first response
rename pbjs to pbams to prevent conflicts w/ other header-bidding lib
on futbolme.com our scripts run in parallel w/ themoneytizer and both we use the same prebidjs open source libe and declare same var pbjs
refresh prebid when adUnit.auto-refresh is true
Add auto-refresh property on AdUnits declarations
Should define a period (interval) of auto-refresh in seconds, this period could be customized through API (pbAMS.setIntervalRefresh in seconds)
allow to launch hb programatically from another js
Due to GDPR implementation on all EU websites the hb should wait for user autorisation before running. This autorization could be the result of an interaction:popup to agree, or automatic is cookies already setted.
We can simulate this interaction via window confirm() method
Should be the rule to wait for call.
Maybe we can consider using dispatchEvent
how to deal with current DOMContentLoaded trigger ?
Add Global Configs in an external file
add sizeConfig parameter to the pbjs.setConfig
add hbAMS.settings.sizes
with
desktop: [
"970, 250",
"970, 90",
"728, 90",
"300, 600",
"300, 250"
],
tablet: [...],
phone: [...]
add sizeConfig on pbjs.SetConfig
sizeConfig: [{
'mediaQuery': '(min-width: 1024px)',
'sizesSupported': hbAMS.settings.sizes.desktop,
'labels': ['desktop']
}, {
'mediaQuery': '(min-width: 768px) and (max-width: 1023px)',
'sizesSupported': hbAMS.settings.sizes.tabler,
'labels': ['tablet']
}, {
'mediaQuery': '(min-width: 0px) and (max-width: 767px)',
'sizesSupported': hbAMS.settings.sizes.phone,
'labels': ['phone']
}]
update of mas demo
forward gdpr values to adserver as params
Find below and example of adServer params including new gdpr params
adServer.config = {
protocol: 'https',
server: 'secserv.adtech.de',
network: '1502.1',
siteid: siteId,
params: {
loc: '100',
kvcat: kvpage + '',
kvref: urlref + '',
kvrefhb: urlref + '',
kvurlend: urlend + '',
gdpr_consent : consentData,
gdpr = gdprApplies,
gdpr_pd = 0
}
}
- gdpr_consent is a String (example : "BON2odxON2odxAOABAENAUIAAAALeACAAyACcA")
- gdprApplies is a Boolean. Should be equals to 1 in EU else 0.
- gdpr_pd is always 0
A test page including a CMP : https://ams-cmp.firebaseapp.com/test-cmp.html
We should copy the code to run a CMP on our own demo page.
Setup performance tracking: loadAdUnit, send prebid, send to AdServer
Only check refresh after DOMLoaded if adUnits auto-refresh exists
track prebid not working no v1.1
deployed on mango
Please check if issue also occurred on v1.3.1
Flush Prebid data after bids responses
DOMContentLoaded is requesting bids already requested by prebid
add gulp task to strip debug, minify and uglify hb_ams-lib
should create /dist
directory to save versions
pbAMS.setAdUnitsMode auto|manual
before prebid request pbAMS should define AdUnits array. If adUnitsMode is auto should parse DOM to find adUnits.code on page (div@id of div@class==ams-ad).
If manual then user should define adUnits to consider with function setAdUnits([ADUNIT_IDs])
move CONFIG.adServer on script configuration and merge it recursively with global CONFIG
pbAMS.setInitMode onload | oncall
Define if prebid is requested automatically on page load, onload, or explicit call, oncall.
onload
On document.eventlistener(DOMLoaded, PREBID_REQUEST(), false)
oncall
prebid request for single AdUnit on dynamic call (used for DFP integration)
should fix the height of Ad after 2st load if auto-refresh to prevent reflow
Upgrade to latest prebid.js version
Prebid 1.0 Publisher API Changes
incl. same adapters as previous version, but remove piximedia and add consentManagement
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.