Anyone know how I can have:
var PREBID_TIMEOUT = 1700;
change on the time of day, so as 1700
is for 10am to 11am, then 1500
from 11am to 12am etc.
I want to modify the timeout effects bids and price depending on time of day, i.e longer timeout when USA is "awake", smaller when "asleep" etc
Or if anyone has already tested that, any info would be useful and appreciated.
This is how you can detect the current hours in js:
After that you can use
hours
variable to pick the right timing. The trick here is that you may need to use this logic for US users only and use a predefined constant for others - you'll need server-side support for that.I.e. use the maxmind database (https://www.maxmind.com/en/geoip2-databases) to map user's ip into his country and pass this variable into html/js
Here's the pseudocode of the solution you might end up with: